diff options
author | Brent Baude <bbaude@redhat.com> | 2020-08-04 13:26:06 -0500 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2020-08-20 12:40:08 -0400 |
commit | 14379d6dbd6caaf331a86a994c9127a71918d6f4 (patch) | |
tree | 3d79d47269220a71580bcd50b0260a68c81dc3f7 /cmd/podman/validate/latest.go | |
parent | 855ce48a929126eb940196d7bd5581f1532ffacf (diff) | |
download | podman-14379d6dbd6caaf331a86a994c9127a71918d6f4.tar.gz podman-14379d6dbd6caaf331a86a994c9127a71918d6f4.tar.bz2 podman-14379d6dbd6caaf331a86a994c9127a71918d6f4.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 0ebed7227..a9049ca2c 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") } } |