Error on file arguments that match nothing - #57
Open
MPV wants to merge 1 commit into
Open
Conversation
MPV
force-pushed
the
claude/error-missing-files
branch
from
July 23, 2026 07:14
cf28833 to
f47ab43
Compare
This was referenced Jul 23, 2026
MPV
force-pushed
the
claude/error-missing-files
branch
from
July 23, 2026 08:24
10f5d17 to
33cead9
Compare
This was referenced Jul 23, 2026
MPV
force-pushed
the
claude/error-missing-files
branch
from
July 23, 2026 08:45
f47ab43 to
10f5d17
Compare
MPV
force-pushed
the
claude/error-missing-files
branch
from
July 24, 2026 06:45
33cead9 to
64ff278
Compare
This was referenced Aug 2, 2026
MPV
force-pushed
the
claude/nonzero-exit
branch
from
August 2, 2026 07:57
713ab54 to
2e16578
Compare
filepath.Glob returns no matches and no error both for a glob that matches nothing and for a literal path that does not exist, so a typo'd filename was silently skipped: `kir typo.yaml` produced no output and exited 0. Treat an argument that resolves to zero files as an error naming that argument; Run then reports it and exits non-zero. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pc6NAURAqjU4LYJx93tgSC
MPV
force-pushed
the
claude/error-missing-files
branch
from
August 2, 2026 07:58
64ff278 to
9bb2ee4
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
Treat a file argument that resolves to zero files as an error naming that argument.
Why
filepath.Globreturns no matches and no error both for a glob that matches nothing and for a literal path that doesn't exist, so a typo'd filename was silently skipped:Behavior change
An argument matching nothing now errors, and
Runreports it and exits non-zero, instead of it being quietly ignored.Testing
TestFindFilesMissing; end-to-end,kir /tmp/nope.yamlnow printsno such file or match for "..."and exits 1.Stack
Second of the CLI stack, on the
Run(...) intshape from #63. Base:claude/nonzero-exit(#55). Merge order: #55 → this.🤖 Generated with Claude Code
https://claude.ai/code/session_01Pc6NAURAqjU4LYJx93tgSC