diff options
author | Brent Baude <bbaude@redhat.com> | 2020-08-04 13:26:06 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2020-08-10 12:05:39 -0500 |
commit | cd74f66bad464f03353321184466da61032b78a5 (patch) | |
tree | dfbd7521bd943096a52cd4db1c5593440034a671 /cmd/podman/validate/latest.go | |
parent | 68fd9aa2cf67a749258ccdc6fa8fd89c2557ebfc (diff) | |
download | podman-cd74f66bad464f03353321184466da61032b78a5.tar.gz podman-cd74f66bad464f03353321184466da61032b78a5.tar.bz2 podman-cd74f66bad464f03353321184466da61032b78a5.zip |
remove --latest for all remote commands
instead of hiding the latest options for podman-remote or catching an error if podman --remote <cmd> -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 <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/validate/latest.go')
-rw-r--r-- | cmd/podman/validate/latest.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cmd/podman/validate/latest.go b/cmd/podman/validate/latest.go index 5c76fe847..c9bff798a 100644 --- a/cmd/podman/validate/latest.go +++ b/cmd/podman/validate/latest.go @@ -7,9 +7,8 @@ import ( func AddLatestFlag(cmd *cobra.Command, b *bool) { // Initialization flag verification - cmd.Flags().BoolVarP(b, "latest", "l", false, - "Act on the latest container podman is aware of\nNot supported with the \"--remote\" flag") - if registry.IsRemote() { - _ = cmd.Flags().MarkHidden("latest") + if !registry.IsRemote() { + cmd.Flags().BoolVarP(b, "latest", "l", false, + "Act on the latest container podman is aware of\nNot supported with the \"--remote\" flag") } } |