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

Allow ignoring errors for adapters failing on files within archives #117

Open
acelticsfan opened this issue Sep 14, 2021 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@acelticsfan
Copy link

acelticsfan commented Sep 14, 2021

I'm trying to look at files in a particular archive that has a number of other archives in it, and one of them is an encrypted zip file that causes the preprocessor to blow up. Is it possible to work around that or fix it? I don't care about searching the encrypted archive. Thanks for the great tool!

$ rga 'search string' ctrllog.tgz
rootvarlog.tgz: preprocessor command failed: '"~/bin/rga-preproc" "rootvarlog.tgz"': 
-------------------------------------------------------------------------------
adapter: decompress
adapter: tar
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: decompress
adapter: zip
adapter: zip
Error: Unsupported Zip archive: Encrypted files are not supported
-------------------------------------------------------------------------------
@acelticsfan
Copy link
Author

acelticsfan commented Sep 14, 2021

I'm trying to exclude the file using a regular rg flag but it doesn't work. I assume because the file is itself an archive within the ctrllog.tgz archive. This example fails:

rga --pre-glob '!*encrypted_file.zip*' 'search string' ctrllog.tgz
. . .
Error: Unsupported Zip archive: Encrypted files are not supported

@acelticsfan
Copy link
Author

acelticsfan commented Sep 14, 2021

Perhaps an enhancement could add a --ignore-preprocess-error flag and always return success to rg.

@phiresky phiresky changed the title Workaround or fix for unsupported zip archive: "Encrypted files are not supported" Allow ignoring errors for adapters failing on files within archives Jan 16, 2024
@phiresky phiresky added the enhancement New feature or request label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants