summaryrefslogtreecommitdiff
path: root/cmd/podman/images/save.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-22 17:40:16 +0000
committerGitHub <noreply@github.com>2020-09-22 17:40:16 +0000
commitfac9252205c089b3bc409a4592e0635a780efaba (patch)
treeb8c0f646f4d72928a0309b23910aa5a6ecb99e74 /cmd/podman/images/save.go
parent4e4c9056e0c044b95bfd808a5afd0fd64f4fa9fc (diff)
parent78afe67e00a78b98483a9bb1cb55f58dffc4c001 (diff)
downloadpodman-fac9252205c089b3bc409a4592e0635a780efaba.tar.gz
podman-fac9252205c089b3bc409a4592e0635a780efaba.tar.bz2
podman-fac9252205c089b3bc409a4592e0635a780efaba.zip
Merge pull request #7719 from vrothberg/fix-multi-image-save
podman save: fix redirect of multi-images
Diffstat (limited to 'cmd/podman/images/save.go')
-rw-r--r--cmd/podman/images/save.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/cmd/podman/images/save.go b/cmd/podman/images/save.go
index c57f61221..b164a2534 100644
--- a/cmd/podman/images/save.go
+++ b/cmd/podman/images/save.go
@@ -94,6 +94,7 @@ func save(cmd *cobra.Command, args []string) (finalErr error) {
return errors.Errorf("--compress can only be set when --format is either 'oci-dir' or 'docker-dir'")
}
if len(saveOpts.Output) == 0 {
+ saveOpts.Quiet = true
fi := os.Stdout
if terminal.IsTerminal(int(fi.Fd())) {
return errors.Errorf("refusing to save to terminal. Use -o flag or redirect")
@@ -122,12 +123,6 @@ func save(cmd *cobra.Command, args []string) (finalErr error) {
tags = args[1:]
}
- // Decide whether c/image's progress bars should use stderr or stdout.
- // If the output is set of stdout, any log message there would corrupt
- // the tarfile.
- if saveOpts.Output == os.Stdout.Name() {
- saveOpts.Quiet = true
- }
err := registry.ImageEngine().Save(context.Background(), args[0], tags, saveOpts)
if err == nil {
succeeded = true