Skip to content
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

handle *grep errors #217

Merged
merged 1 commit into from
May 20, 2024
Merged

handle *grep errors #217

merged 1 commit into from
May 20, 2024

Conversation

vrothberg
Copy link
Owner

Try parsing the stdout of *grep even in case of an error. This allows to return output when hitting, for instance, eperms on certain files.

The stderr of *grep is now logged directly while the exit code is being recorded and used by vgrep on exit.

Fixes: #216

@vrothberg
Copy link
Owner Author

CI is failing as the eperm test doesn't work when running as root.

@inknos
Copy link

inknos commented May 17, 2024

Tested it and the behavior is as expected (both vgrep and the fzf integration). Thanks!

@vrothberg
Copy link
Owner Author

Thanks a ton! I will get back to this PR next week trying to find a solution for CI.

Try parsing the stdout of *grep even in case of an error. This allows to
return output when hitting, for instance, eperms on certain files.

The stderr of *grep is now logged directly while the exit code is being
recorded and used by vgrep on exit.

Fixes: #216
Signed-off-by: Valentin Rothberg <[email protected]>
@vrothberg vrothberg merged commit 29ae5d7 into main May 20, 2024
1 check passed
@vrothberg vrothberg deleted the fix-216 branch May 20, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When ripgrep is installed, vgrep exits when a file with no read access is in the directory
2 participants