-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix line splitting from ripgrep --json output #16
base: master
Are you sure you want to change the base?
Conversation
@danipozo could you give an example of how you expect ripgreps response to look like with the |
ripgrepy currently throws an exception with the
This exception is caused by splitting the output of
is broken at the |
I am not confident that the PR will solve this issue besides on systems that uses I think a better PR would be to pass the For example:
You have to help me understand |
I believe I've encountered this problem as I too am getting decoding errors. It seems like a bug if What about an approach where it splits by newline, and then tries to decode each time it hits a newline. If it fails, it stores it in a running |
ripgrep --json
results may contain characters that are considered newlines bystr.splitlines
, because it only treats\n
or\r\n
as newlines (this file is an example where that happens).ripgrep
's output itself is separated by standard newlines.Tested with dependent SeaGOAT.