Surface WiX tool stdout/stderr on MSI build failure
release / gui-build (linux, bash) (push) Successful in 1m11s
release / gui-build (windows, cmd) (push) Failing after 1m31s
release / gui-build (macos, bash) (push) Failing after 11m44s

This commit is contained in:
2026-09-22 22:38:14 +00:00
parent 734b7993a2
commit c59040ce52
+10 -2
View File
@@ -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),