diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-01-25 09:41:55 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-01-25 14:58:24 -0500 |
commit | 5623cb9d3d722a7015a395b31ce9ee7d9954bed9 (patch) | |
tree | 3d60e8ff3f29902dc082ec0ecce1a5a52c804579 /cmd/podman/manifest/add.go | |
parent | 23b879d72f9e2cf2b2d3924399605e0edebaa977 (diff) | |
download | podman-5623cb9d3d722a7015a395b31ce9ee7d9954bed9.tar.gz podman-5623cb9d3d722a7015a395b31ce9ee7d9954bed9.tar.bz2 podman-5623cb9d3d722a7015a395b31ce9ee7d9954bed9.zip |
Fix --arch and --os flags to work correctly
Currently podman implements --override-arch and --overide-os
But Podman has made these aliases for --arch and --os. No
reason to have to specify --override, since it is clear what
the user intends.
Currently if the user specifies an --override-arch field but the
image was previously pulled for a different Arch, podman run uses
the different arch. This PR also fixes this issue.
Fixes: https://github.com/containers/podman/issues/8001
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/manifest/add.go')
-rw-r--r-- | cmd/podman/manifest/add.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/manifest/add.go b/cmd/podman/manifest/add.go index cb0838eeb..b33f01c10 100644 --- a/cmd/podman/manifest/add.go +++ b/cmd/podman/manifest/add.go @@ -52,7 +52,7 @@ func init() { archFlagName := "arch" flags.StringVar(&manifestAddOpts.Arch, archFlagName, "", "override the `architecture` of the specified image") - _ = addCmd.RegisterFlagCompletionFunc(archFlagName, completion.AutocompleteNone) + _ = addCmd.RegisterFlagCompletionFunc(archFlagName, completion.AutocompleteArch) authfileFlagName := "authfile" flags.StringVar(&manifestAddOpts.Authfile, authfileFlagName, auth.GetDefaultAuthFile(), "path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override") @@ -72,7 +72,7 @@ func init() { osFlagName := "os" flags.StringVar(&manifestAddOpts.OS, osFlagName, "", "override the `OS` of the specified image") - _ = addCmd.RegisterFlagCompletionFunc(osFlagName, completion.AutocompleteNone) + _ = addCmd.RegisterFlagCompletionFunc(osFlagName, completion.AutocompleteOS) osVersionFlagName := "os-version" flags.StringVar(&manifestAddOpts.OSVersion, osVersionFlagName, "", "override the OS `version` of the specified image") |