summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoang Thanh VO <111461555+ht-vo@users.noreply.github.com>2022-08-17 22:49:10 +0200
committerMatthew Heon <mheon@redhat.com>2022-09-06 14:01:59 -0400
commit0ab8ebd1a8cd7a9bb458c7573030fa7c19f5406c (patch)
treef423f245e4b618dc51616b2c321029260cc078ae
parent45672c61d771bea65c8072c6c627179ee7279cb7 (diff)
downloadpodman-0ab8ebd1a8cd7a9bb458c7573030fa7c19f5406c.tar.gz
podman-0ab8ebd1a8cd7a9bb458c7573030fa7c19f5406c.tar.bz2
podman-0ab8ebd1a8cd7a9bb458c7573030fa7c19f5406c.zip
podman save: update --compress validation
[NO NEW TESTS NEEDED] Signed-off-by: Hoang Thanh VO <111461555+ht-vo@users.noreply.github.com>
-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