fix: add --no-messages and tolerate exit code 2 in glob/grep tools#3727
Open
aaronkyriesenbach wants to merge 1 commit into
Open
fix: add --no-messages and tolerate exit code 2 in glob/grep tools#3727aaronkyriesenbach wants to merge 1 commit into
aaronkyriesenbach wants to merge 1 commit into
Conversation
Broken/dangling symlinks cause ripgrep to exit with code 2 and write warnings to stderr. The glob and grep tools treated exit code 2 as fatal, discarding valid stdout results. Two changes per tool: - Add --no-messages to suppress non-fatal I/O warnings from stderr - Change exit code check from >1 to >2 so partial I/O errors (broken symlinks) don't discard valid results Closes code-yeongyu#3726
Contributor
|
All contributors have signed the CLA. Thank you! ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
VoidChecksum
added a commit
to VoidChecksum/oh-my-openagent
that referenced
this pull request
Apr 30, 2026
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.
Summary
Changes
src/tools/glob/constants.ts: Add--no-messagestoRG_FILES_FLAGSto suppress non-fatal I/O warningssrc/tools/glob/cli.ts: Change exit code check from> 1to> 2so broken symlinks don't discard valid resultssrc/tools/grep/constants.ts: Add--no-messagestoRG_SAFETY_FLAGS(same fix)src/tools/grep/cli.ts: Change exit code check from> 1to> 2(same fix)src/tools/glob/cli.test.ts: Add test verifying--no-messagesis included in ripgrep argsTesting
bun run typecheck bun test src/tools/glob/cli.test.tsAll 19 glob CLI tests pass, typecheck clean.
Related Issues
Closes #3726
Need help on this PR? Tag
@codesmithwith what you need.Summary by cubic
Fix glob and grep to handle broken/dangling symlinks without dropping valid results by adding
--no-messagesto ripgrep flags and treating exit code 2 as non‑fatal. Closes #3726.Written for commit 7056fc1. Summary will update on new commits. Review in cubic