Closed egibs closed 2 months ago
I’m going to spend more time on this tomorrow; I want to preserve the directory structure when extracting data.tar.gz and revisit the extraction addition to extractTar.
We should get some tests in place to make sure we don't break this in the future, but first we'll want to work on making output predictable for extracted files.
Definitely -- I was just thinking about addressing testing gaps re: all of the recently-added features 😅
Closes: https://github.com/chainguard-dev/bincapz/issues/202
This PR adds support for
.gem
files which are tricky to work with as noted in the issue. If a.gem
file is scanned, it will be extracted and then its nested archives will be recursively extracted until only the original files are present in the temporary directory.I added two more extraction functions to help with
.gz
archives (checksums.yaml.gz
andmetadata.gz
necessitated this) and nested archives as well. Right now, the latter will only be called when processing.gem
archives but it may make sense to allow nested support for all archive types sooner rather than later. TBD, though.Examples using the file from the issue:
I validated that the extraction is working the same as a manual extraction would:
I thought that there was an archived directory but it instead extracts all of the files.