Repository navigation
fix(core): surface malformed glob errors from ripgrep - #56518
rudycelekli wants to merge 3 commits into
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
The fix works for the reported case, but as written it breaks some searches that work today.
How I checked: your two new tests fail on the base and pass with this change (29/29 in ripgrep.test.ts and tool-search.test.ts), and the packages/core typecheck passes. I also ran ripgrep by hand and with a temporary test against both branches.
Public API: unchanged.
The problem: ripgrep prints the same error parsing glob text for a bad line in a project's .gitignore or .ignore, and then keeps searching. If anything else in the same run makes ripgrep exit 2, such as a broken symlink with follow: true, the new check discards the results. With a .ignore containing [ plus a broken symlink, glob and find return [a.ts] on the base but fail with Ripgrep.Error on this branch. find backs Search.find. grep isn't affected because it passes --no-messages. Details are in the inline comment.
Signed-off-by: Rudy Celekli <[email protected]>
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #47474
Type of change
What does this PR do?
Report ripgrep’s malformed-glob diagnostics instead of presenting an empty successful search. Keep valid no-match searches and other exit-2 partial results intact.
How did you verify your code works?
bun run check(34 tasks) passed.Screenshots / recordings
No visual UI code changed; behavior is asserted directly.
Checklist