fix: --reset no longer requires local Slack export path
CI / skip-ci-check (pull_request) Successful in 31s
CI / secret-scan (pull_request) Successful in 31s
CI / python-ci (pull_request) Successful in 40s

test_reset_only_writes failed in CI (no ~/Downloads export) while
passing on a laptop that has the Levkin export. Skip SlackExport load
when --reset returns early.
This commit is contained in:
2026-08-06 13:41:30 -04:00
parent b24544066e
commit f6e572e117
+4 -4
View File
@@ -355,10 +355,6 @@ def main() -> int:
if not arg.startswith("-") and Path(arg).expanduser().is_dir():
export_path = Path(arg).expanduser().resolve()
sys.path.insert(0, str(REPO_ROOT))
from slack_export import SlackExport
export = SlackExport(export_path)
manifest: dict = {"channels": {}, "users": {}}
if MANIFEST_PATH.is_file():
manifest = json.loads(MANIFEST_PATH.read_text(encoding="utf-8"))
@@ -377,6 +373,10 @@ def main() -> int:
)
return 0
sys.path.insert(0, str(REPO_ROOT))
from slack_export import SlackExport
export = SlackExport(export_path)
channels = manifest.setdefault("channels", {})
stats: dict[str, int] = {}