aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorHoang Thanh VO <111461555+ht-vo@users.noreply.github.com>2022-08-17 22:49:10 +0200
committerHoang Thanh VO <111461555+ht-vo@users.noreply.github.com>2022-08-18 09:36:44 +0200
commit976ce76ebaa7cfcb5de28f12b8f4a2e81f6b8e7d (patch)
treed0efc0ad8db130caee857ed8782fe614fcec277a /cmd
parent5de215e1447af96ec2b199794cd425b75a2da08a (diff)
downloadpodman-976ce76ebaa7cfcb5de28f12b8f4a2e81f6b8e7d.tar.gz
podman-976ce76ebaa7cfcb5de28f12b8f4a2e81f6b8e7d.tar.bz2
podman-976ce76ebaa7cfcb5de28f12b8f4a2e81f6b8e7d.zip
podman save: update --compress validation
[NO NEW TESTS NEEDED] Signed-off-by: Hoang Thanh VO <111461555+ht-vo@users.noreply.github.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/images/save.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/images/save.go b/cmd/podman/images/save.go
index 43366e1b3..ecff0f841 100644
--- a/cmd/podman/images/save.go
+++ b/cmd/podman/images/save.go
@@ -103,8 +103,8 @@ func save(cmd *cobra.Command, args []string) (finalErr error) {
tags []string
succeeded = false
)
- if cmd.Flag("compress").Changed && (saveOpts.Format != define.OCIManifestDir && saveOpts.Format != define.V2s2ManifestDir) {
- return errors.New("--compress can only be set when --format is either 'oci-dir' or 'docker-dir'")
+ if cmd.Flag("compress").Changed && saveOpts.Format != define.V2s2ManifestDir {
+ return errors.New("--compress can only be set when --format is 'docker-dir'")
}
if len(saveOpts.Output) == 0 {
saveOpts.Quiet = true