-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors with broken symlinks appears even if --no-messages is passed #241
Comments
I think this is intended behavior. You'll get a similar error if you don't have permission to read a file or directory, for example:
This matches the behavior of
To drive this point home, GNU grep behaves similarly:
Given the above evidence, I think ripgrep's current behavior is probably right.
ripgrep writes all such error messages to stderr. This is common in CLI applications and it is easy to suppress such output by redirecting stderr to
If redirection like this is inconvenient, then you can pass the
Ah ha! A bug! I'll push a fix shortly for that. But that |
I think you are right & I agree with you, because honestly I like that it reports the errors back when you have a broken symlink & since there is a way to suppress this when needed then it's ok.
Will use redirection for now till this is fixed then 😄 |
@ahmedelgabri Great. Keeping this open to track the bug I found. :-) |
If you have a broken symlink somewhere in the path that you are searching in you will get this error
No such file or directory (os error 2)
on macOS. Not sure how this should be handled though, for example it seems theag
ignores these errors.The problem that if you try to use
rg
with another tool that depends on the output, something likefzf
it will break or you get some weird stuff.The text was updated successfully, but these errors were encountered: