You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
shell.exec raises on a non-zero exit instead of returning the result, and the captured stderr is lost #824
shell.exec returns a *Result carrying stdout, stderr and the exit code, and its doc says the
result is still returned on a non-zero exit "with whatever was captured". From Starlark it is not:
a non-zero exit raises, and the caller never sees the result.
Observed
r=shell.exec(command="gh issue list --json number")
ifr.exit_code!=0:
fail("gh issue list failed: "+r.stderr.strip())
When gh exits 4 (not authenticated), the if is never reached. The user sees:
Error in shell.exec: exit status 4
gh's own message — the thing that says why — was captured into Result.Stderr and discarded on
the way out. Every exit_code check in Starlark is unreachable code.
Wanted
One of:
return the result on non-zero exit, as the Go doc already promises, and let the script decide, or
keep raising, but include the captured stderr in the error.
Observed under noblefactor-ops#140 Phase 1. Belongs with #800's bypass of pkg/process, since a
single bridge is where this rule lives once.
Activity
David-Noble-at-work commentedon Nov 9, 2026
star github triage sweep added this issue to Triage: devlore, for the rules it breaks:
severity: a Bug whose Severity is blank; a bug is Critical, High, Medium or Lowno-evidence: no Evidence of completion section