You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The changes for this issue are fairly straight forward.
Need to extend the -x flag to be a persistent flag instead of a rootcmd local flag
Remove the guard against using the flag with multifile
Enhance the consumer interface for Fetch to take a content-type value (most consumers will ignore it)
Pass the content-type to the consumer (this is available in the http.Response
The output can run through the current tar-extractor consumer
However there are two approaches to untarring in multifile mode:
New wrapper consumer for tar-extract when in multifile mode
This consumer can fallthrough to the standard file-writer or pass to the current tar-extractor depending on content-type
enhance current tar-extractor consumer to consider the content-type (if passed) before extracting
The current code that leans on pkg/extract/tar.go to handle tar files should be sufficient for actual extraction, but we need to make it so we can extract tar files (if they exist) in multifile mode when asked to do so. Multifile mode may have multiple tar files, some tar files, or a mix of tar and non-tar files.
I am open alternate solutions to what I've typed above. If you have additional thoughts on how to better handle the tar extraction -- I'm totally open to that!
multifile should opportunistically extract tar files when -x is set. This means looking at the content-type and knowing what to do.
The text was updated successfully, but these errors were encountered: