phiresky / ripgrep-all

rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Error: Broken pipe (os error 32)` on `-l` with `--rga-acurate`

Neved4 opened this issue · comments

Describe the bug
ripgrep-all fails when -l is combined with slow matching. Removing -l results in no errors.

To Reproduce

Combine --rga-accurate with --files-with-matches on an undefined file extension that'll rely on slow matchers.

Attach example file: test.gz (rename to .als)

Command

rga -l --rga-accurate -e 'pattern' -g '*.als'

Output

-------------------------------------------------------------------------------
adapter: decompress
Error: Broken pipe (os error 32)
-------------------------------------------------------------------------------
Documents/test.als: 

Operating System and Version
macOS 13.5.2 (ARM64)

Output of rga --version
ripgrep-all 0.9.6

I think this is fixed in 1.0.0-alpha.5 since the process preproc process without error if rg stops reading:

// happens if e.g. ripgrep detects binary data in the pipe so it cancels reading
debug!("output cancelled (broken pipe)");

. I at least cannot reproduce this anymore with the given example file.

@phiresky LGTM! 🎉 🚀