-
Notifications
You must be signed in to change notification settings - Fork 25
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
unpack local file bundle #318
Conversation
if err != nil { | ||
return nil, err | ||
var err error | ||
if strings.HasPrefix(local, filePrefix) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good! I think it's safe to just check the input for the file suffix. No need to specify --local at that point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
DownloadAndExtractDockerImage will be called only if it's !local && !strings.HasPrefix(image, filePrefix)
rest of the cases - ExtractDockerImage will be called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just make it available nevertheless if we are specifying --local or not? Local makes sense only to redirect requests to the local daemon
11df83d
to
7956938
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good! thanks!
care to add a small unit test? I'm trying to fix the CI in #319 meanwhile |
issue : 317
take image file path as an input and extract the content to destination path.
ex: luet util unpack file://home/us/alpine.tar /tmp --local