Skip to content

fix: suppress Go's *exec.ExitError leakage into task output#130

Merged
alajmo merged 1 commit into
mainfrom
fix/suppress-exit-status-leak
May 14, 2026
Merged

fix: suppress Go's *exec.ExitError leakage into task output#130
alajmo merged 1 commit into
mainfrom
fix/suppress-exit-status-leak

Conversation

@alajmo

@alajmo alajmo commented May 14, 2026

Copy link
Copy Markdown
Owner

Previously, when a task command exited non-zero, mani appended Go's stdlib *exec.ExitError string ('exit status N') to the output cell (table mode) or to stderr (stream mode). This is internal Go representation leaking through — the command's own stderr is already captured separately, so the suffix added no information when failures were real, and polluted the cell when commands intentionally exited non-zero with no output (e.g. grep -v with no matches), breaking --omit-empty-rows.

Now mani drops the synthetic 'exit status N' line for *exec.ExitError only. Other error types (I/O failures, plumbing errors, etc.) still surface. ignore_errors semantics are unchanged: it still controls whether subsequent commands in a multi-command task run after one fails on a given project.

Previously, when a task command exited non-zero, mani appended Go's
stdlib *exec.ExitError string ('exit status N') to the output cell
(table mode) or to stderr (stream mode). This is internal Go
representation leaking through — the command's own stderr is already
captured separately, so the suffix added no information when failures
were real, and polluted the cell when commands intentionally exited
non-zero with no output (e.g. `grep -v` with no matches), breaking
--omit-empty-rows.

Now mani drops the synthetic 'exit status N' line for *exec.ExitError
only. Other error types (I/O failures, plumbing errors, etc.) still
surface. ignore_errors semantics are unchanged: it still controls
whether subsequent commands in a multi-command task run after one
fails on a given project.
@alajmo alajmo merged commit 19ffb07 into main May 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant