summaryrefslogtreecommitdiff
path: root/cmd/podman/validate/latest.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-08-04 13:26:06 -0500
committerMatthew Heon <matthew.heon@pm.me>2020-08-20 12:40:08 -0400
commit14379d6dbd6caaf331a86a994c9127a71918d6f4 (patch)
tree3d79d47269220a71580bcd50b0260a68c81dc3f7 /cmd/podman/validate/latest.go
parent855ce48a929126eb940196d7bd5581f1532ffacf (diff)
downloadpodman-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.go7
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")
}
}