Point orphan recovery hint to update

This commit is contained in:
Nick Sweeting 2026-08-09 20:30:09 -04:00
parent 08e998f7d1
commit 87e8c8aef5
2 changed files with 4 additions and 3 deletions

View File

@ -115,7 +115,7 @@ def status(out_dir: Path = CONSTANTS.DATA_DIR) -> None:
if orphaned_dirs:
print(" [violet]Hint:[/violet] To automatically import orphaned data directories into the main index, run:")
print(" [green]archivebox init[/green]")
print(" [green]archivebox update[/green]")
print()
print("[green]\\[*] Scanning recent archive changes and user logins:[/green]")

View File

@ -98,12 +98,13 @@ def test_status_detects_orphaned_directories(initialized_archive):
_create_snapshot_rows(initialized_archive, env, "https://example.com")
# Create an orphaned directory
(initialized_archive / "archive" / "fake_orphaned_dir").mkdir(parents=True, exist_ok=True)
(initialized_archive / "archive" / "1234567890").mkdir(parents=True, exist_ok=True)
result = run_archivebox_cmd(["status"], cwd=initialized_archive)
# Should mention orphaned dirs
assert "orphan" in result.stdout.lower() or "1" in result.stdout
assert "orphan" in result.stdout.lower()
assert "archivebox update" in result.stdout
def test_status_counts_new_snapshot_output_dirs_as_archived(initialized_archive):