From c59040ce52cafc3de70b39a66d49a6ebca4db33e Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Tue, 22 Sep 2026 22:38:14 +0000 Subject: [PATCH] Surface WiX tool stdout/stderr on MSI build failure --- scripts/guibuild.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/guibuild.py b/scripts/guibuild.py index 31c4d7a..8be17c6 100755 --- a/scripts/guibuild.py +++ b/scripts/guibuild.py @@ -233,9 +233,17 @@ def build_msi(version: str) -> Path: def run(tool: str, args: list[str]) -> None: cmd = [str(wix / tool), *args] print(f"Running: {' '.join(cmd)}") - result = subprocess.run(cmd, cwd=_REPO_ROOT) + try: + result = subprocess.run( + cmd, cwd=_REPO_ROOT, capture_output=True, text=True + ) + except OSError as exc: + raise RuntimeError(f"{tool} failed to start: {exc}") from exc if result.returncode != 0: - raise RuntimeError(f"{tool} failed with exit code {result.returncode}") + raise RuntimeError( + f"{tool} failed with exit code {result.returncode}\n" + f"stdout:\n{result.stdout}\nstderr:\n{result.stderr}" + ) run("heat.exe", [ "dir", str(dist_folder),