From cd74f66bad464f03353321184466da61032b78a5 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Tue, 4 Aug 2020 13:26:06 -0500 Subject: remove --latest for all remote commands instead of hiding the latest options for podman-remote or catching an error if podman --remote -l is used, we no longer add the latest option to any remote command. podman will error with a "unknown flag" option. Fixes: #7127 Signed-off-by: Brent Baude --- cmd/podman/root.go | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'cmd/podman/root.go') diff --git a/cmd/podman/root.go b/cmd/podman/root.go index 9e9011dc9..2aa7267c2 100644 --- a/cmd/podman/root.go +++ b/cmd/podman/root.go @@ -6,7 +6,6 @@ import ( "path" "runtime" "runtime/pprof" - "strconv" "strings" "github.com/containers/common/pkg/config" @@ -112,15 +111,6 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error { cfg := registry.PodmanConfig() - // Validate --remote and --latest not given on same command - latest := cmd.Flags().Lookup("latest") - if latest != nil { - value, _ := strconv.ParseBool(latest.Value.String()) - if cfg.Remote && value { - return errors.Errorf("For %s \"--remote\" and \"--latest\", are mutually exclusive flags", cmd.CommandPath()) - } - } - // Prep the engines if _, err := registry.NewImageEngine(cmd, args); err != nil { return err -- cgit v1.2.3-54-g00ecf