Exit non-zero when a file cannot be processed - #55
Open
MPV wants to merge 1 commit into
Open
Conversation
MPV
force-pushed
the
claude/execute-returns-error
branch
from
July 23, 2026 07:14
dea6982 to
c060823
Compare
MPV
force-pushed
the
claude/execute-returns-error
branch
from
July 23, 2026 08:17
c060823 to
b3973cd
Compare
This was referenced Jul 23, 2026
MPV
force-pushed
the
claude/execute-returns-error
branch
from
July 23, 2026 08:46
b3973cd to
d81dee0
Compare
MPV
force-pushed
the
claude/execute-returns-error
branch
from
July 24, 2026 06:45
d81dee0 to
52bfab2
Compare
Per-file processing errors were logged but Run still returned 0, so a pipeline like `kir manifests/* | xargs grype` could not tell that some manifests failed to parse — the kind of silent gap that matters for a tool feeding a vulnerability scanner. Count per-file failures and, after processing every file, return a non-zero exit code. Files that succeed are still printed; only the exit status changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pc6NAURAqjU4LYJx93tgSC
MPV
force-pushed
the
claude/nonzero-exit
branch
from
August 2, 2026 07:57
713ab54 to
2e16578
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Make
Runcount per-file processing failures and, after processing every file, return a non-zero exit code. Files that succeed are still printed.Why
Per-file errors were logged but
Runstill returned0, so a pipeline likekir manifests/* | xargs grypecouldn't tell that some manifests failed to parse — the kind of silent gap that matters for a tool feeding a vulnerability scanner.Behavior change
A run where any file fails now exits non-zero (was
0). Output for the files that succeeded is unchanged.Testing
TestRunFileFailure: a good + a malformed file → exit1, with the good file's image still on stdout.Stack
Reworked onto the
Run(...) intentry point from #63 (this replaces the old #50→#55 chain; #50 is closed as superseded). Base:master. Root of the CLI stack — merge order: this →claude/error-missing-files(#57).🤖 Generated with Claude Code
https://claude.ai/code/session_01Pc6NAURAqjU4LYJx93tgSC