Skip to content

The agent that grows with you

fix(release): log stderr when gh workflow fails

ethernet7753ffa0ccb4
diff --git a/scripts/releases/commit_build.py b/scripts/releases/commit_build.py
index 279c5c5355c..71c1efb3e2e 100644
--- a/scripts/releases/commit_build.py
+++ b/scripts/releases/commit_build.py
@@ -120,7 +120,10 @@ def cmd_build_commit(args) -> None:
encoding="utf-8", errors="replace", check=True, timeout=60)
print((result.stdout or "").strip() or f"Dispatched commit build {commit}. No release was created.")
except (OSError, ValueError, subprocess.SubprocessError) as exc:
- raise SystemExit(f"release: commit build refused: {exc}") from exc
+ stderr = ""
+ if isinstance(exc, subprocess.CalledProcessError):
+ stderr = "\n" + exc.stderr
+ raise SystemExit(f"release: commit build refused: {exc}{stderr}") from exc
def main() -> None: