aboutsummaryrefslogtreecommitdiff
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.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmd/podman/validate/latest.go b/cmd/podman/validate/latest.go
new file mode 100644
index 000000000..6e2aa063b
--- /dev/null
+++ b/cmd/podman/validate/latest.go
@@ -0,0 +1,15 @@
+package validate
+
+import (
+ "github.com/containers/libpod/cmd/podman/registry"
+ "github.com/spf13/cobra"
+)
+
+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")
+ }
+}