From 6bec101041abba77329a7e04a329ab9792f7e1aa Mon Sep 17 00:00:00 2001 From: zhangguanzhang Date: Wed, 14 Apr 2021 12:55:45 +0800 Subject: Fixes invalid expression in save command Signed-off-by: zhangguanzhang --- cmd/podman/images/save.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/podman') diff --git a/cmd/podman/images/save.go b/cmd/podman/images/save.go index 6c03fc3c6..f1f7e8b2e 100644 --- a/cmd/podman/images/save.go +++ b/cmd/podman/images/save.go @@ -102,7 +102,7 @@ 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 && saveOpts.Format == "") { + if cmd.Flag("compress").Changed && (saveOpts.Format != define.OCIManifestDir && saveOpts.Format != define.V2s2ManifestDir) { return errors.Errorf("--compress can only be set when --format is either 'oci-dir' or 'docker-dir'") } if len(saveOpts.Output) == 0 { -- cgit v1.2.3-54-g00ecf