summaryrefslogtreecommitdiff
path: root/cmd/podman/validate/latest.go
diff options
context:
space:
mode:
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")
}
}