diff options
author | Paul Holzinger <pholzing@redhat.com> | 2022-05-17 16:36:15 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2022-05-19 14:04:22 +0200 |
commit | 337f8b9d98e9eac0d8b826fd7c8d0e94342e0d9f (patch) | |
tree | 039aaeb1f249ea872981548095c45cb888c2b3af /cmd/podman/images | |
parent | 74f70315b30e9fdd3113181d94b2e64e505a05d5 (diff) | |
download | podman-337f8b9d98e9eac0d8b826fd7c8d0e94342e0d9f.tar.gz podman-337f8b9d98e9eac0d8b826fd7c8d0e94342e0d9f.tar.bz2 podman-337f8b9d98e9eac0d8b826fd7c8d0e94342e0d9f.zip |
shell completion: podman save --format use all valid values
docker-archive was missing from the completions. To prevent duplication
use the same format list as podman save.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'cmd/podman/images')
-rw-r--r-- | cmd/podman/images/save.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/podman/images/save.go b/cmd/podman/images/save.go index fb642bafd..3394c2e99 100644 --- a/cmd/podman/images/save.go +++ b/cmd/podman/images/save.go @@ -18,7 +18,6 @@ import ( ) var ( - validFormats = []string{define.OCIManifestDir, define.OCIArchive, define.V2s2ManifestDir, define.V2s2Archive} containerConfig = registry.PodmanConfig() ) @@ -38,8 +37,8 @@ var ( if err != nil { return err } - if !util.StringInSlice(format, validFormats) { - return errors.Errorf("format value must be one of %s", strings.Join(validFormats, " ")) + if !util.StringInSlice(format, common.ValidSaveFormats) { + return errors.Errorf("format value must be one of %s", strings.Join(common.ValidSaveFormats, " ")) } return nil }, |