diff --git a/harbor/logbook_auto.py b/harbor/logbook_auto.py index 7fefb45..00d1c33 100644 --- a/harbor/logbook_auto.py +++ b/harbor/logbook_auto.py @@ -13,6 +13,7 @@ Milestones and narrative entries stay with people: they need judgement. State (the last commit seen) is kept in the logbook folder as auto.json.""" import json +import os import re import subprocess import sys @@ -81,7 +82,9 @@ def log_commits(project, repo, since, head): def rebuild_stats(project, repo, stats_repo, head): """Run the open-seas progress tools on the scratch copy and store their statistics and chart.""" tools = Path(stats_repo) / "tools" / "progress" - run = lambda *argv: subprocess.run([sys.executable, "-B", *map(str, argv)], cwd=str(stats_repo), + # its own data dir: the agents' compiles hold the shared decomp-build\pirates.h open + env = dict(os.environ, OPENSEAS_DATA=os.environ.get("HARBOR_LOGBOOK_DATA", r"R:\Workspace\Data\openseas-logbook")) + run = lambda *argv: subprocess.run([sys.executable, "-B", *map(str, argv)], cwd=str(stats_repo), env=env, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=900) sync = run(tools / "sync_decomp.py", "--decomp", repo) if sync.returncode != 0: