From 5da474dec055a678a2870e54f017c022ba4bf71a Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 25 Jan 2021 09:41:55 -0500 Subject: 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 --- cmd/podman/utils/alias.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd/podman/utils/alias.go') diff --git a/cmd/podman/utils/alias.go b/cmd/podman/utils/alias.go index 469233b59..8d089920b 100644 --- a/cmd/podman/utils/alias.go +++ b/cmd/podman/utils/alias.go @@ -25,6 +25,12 @@ func AliasFlags(f *pflag.FlagSet, name string) pflag.NormalizedName { name = "external" case "purge": name = "rm" + case "override-arch": + name = "arch" + case "override-os": + name = "os" + case "override-variant": + name = "variant" } return pflag.NormalizedName(name) } -- cgit v1.2.3-54-g00ecf