From a92efdad45fa40f31772dfd55faad241d912f0bd Mon Sep 17 00:00:00 2001 From: KeelrLeek <156356974+KeelrLeek@users.noreply.github.com> Date: Tue, 6 Oct 2026 16:21:58 -0500 Subject: [PATCH] Logbook stats rebuild: put the Visual Studio Installer folder (vswhere) on PATH, which a server started without a shell lacks --- harbor/logbook_auto.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/harbor/logbook_auto.py b/harbor/logbook_auto.py index 00d1c33..92c3124 100644 --- a/harbor/logbook_auto.py +++ b/harbor/logbook_auto.py @@ -84,6 +84,10 @@ def rebuild_stats(project, repo, stats_repo, head): tools = Path(stats_repo) / "tools" / "progress" # 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")) + # the readable build finds the compiler through vswhere, which a server started without a shell's PATH lacks + installer = r"C:\Program Files (x86)\Microsoft Visual Studio\Installer" + if os.path.isdir(installer) and installer.lower() not in env.get("PATH", "").lower(): + env["PATH"] = installer + os.pathsep + env.get("PATH", "") 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)