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
Add --file to image extraction to simplify getting single files
As a user, if i want a single file out of an image it's annoying. Make
extraction explicit (does not require confirm) if you want to extract
a single file into the current directory.
oc image extract IMAGE --file /usr/bin/ls
copies ls into the current directory.
flag.BoolVar(&o.DryRun, "dry-run", o.DryRun, "Print the actions that would be taken and exit without writing any contents.")
156
157
flag.BoolVar(&o.Insecure, "insecure", o.Insecure, "Allow pull operations to registries to be made over HTTP")
157
158
159
+
flag.StringSliceVar(&o.Files, "file", o.Files, "Extract the specified files to the current directory.")
158
160
flag.StringSliceVar(&o.Paths, "path", o.Paths, "Extract only part of an image. Must be SRC:DST where SRC is the path within the image and DST a local directory. If not specified the default is to extract everything to the current directory.")
159
161
flag.BoolVarP(&o.PreservePermissions, "preserve-ownership", "p", o.PreservePermissions, "Preserve the permissions of extracted files.")
160
162
flag.BoolVar(&o.OnlyFiles, "only-files", o.OnlyFiles, "Only extract regular files and directories from the image.")
0 commit comments