phiresky / ripgrep-all

rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.
Other
6.4k stars 148 forks source link

Error: copying adapter output to stdout #198

Closed DhruvaG2000 closed 6 months ago

DhruvaG2000 commented 6 months ago

Just downloaded and source compiled rga,

 11:53:16 ripgrep-all on  master ➜ ./target/debug/rga --version          
ripgrep-all 1.0.0-alpha.5

and when I search "hello" on the exampleDir I get these errors in one of the results:

exampledir/decompress/test.log.bz2  
hello world
exampledir/droste.zip: preprocessor command failed: '"/home/dhruva/fun_workspace/ripgrep-all/target/debug/rga-preproc" "exampledir/drost
e.zip"':                 
-------------------------------------------------------------------------------
/home/dhruva/fun_workspace/ripgrep-all/exampledir/droste.zip adapter: zip
droste.jpg adapter: postprocprefix 
droste.zip adapter: zip
droste.jpg adapter: postprocprefix 
droste.zip adapter: zip
droste.jpg adapter: postprocprefix 
droste.zip adapter: zip
Error: copying adapter output to stdout

Caused by:
    0: going to next file in zip but entry was not read fully
    1: end of file has not been reached
-------------------------------------------------------------------------------

To Reproduce

Attach example file: No external file needed, Run command:

./target/debug/rga "hello" exampledir

Operating System and Version Linux Mint 21.1 x86_64

phiresky commented 6 months ago

The droste.zip file is a zip file that contains itself. Erroring on it is fine, just hanging on 100% would be considered wrong.