summaryrefslogtreecommitdiff
path: root/cmd/podman/validate/args.go
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-07-14 19:16:05 +0000
committerGitHub <noreply@github.com>2022-07-14 19:16:05 +0000
commitf6e41e77c75826b141291940e7678e63c0ec2351 (patch)
tree6ef05dd35b69bd870b0f5355646123ecc98c090f /cmd/podman/validate/args.go
parent313ec3e2518745147438c28f8461eef6f629eab9 (diff)
parenta2f6cc74e72edf0b7045c8410ed3f45489999e2b (diff)
downloadpodman-f6e41e77c75826b141291940e7678e63c0ec2351.tar.gz
podman-f6e41e77c75826b141291940e7678e63c0ec2351.tar.bz2
podman-f6e41e77c75826b141291940e7678e63c0ec2351.zip
Merge pull request #14832 from karthikelango137/filterFlagStop
Podman stop --filter flag
Diffstat (limited to 'cmd/podman/validate/args.go')
-rw-r--r--cmd/podman/validate/args.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/podman/validate/args.go b/cmd/podman/validate/args.go
index 39eedca64..6d212665d 100644
--- a/cmd/podman/validate/args.go
+++ b/cmd/podman/validate/args.go
@@ -86,6 +86,13 @@ func CheckAllLatestAndIDFile(c *cobra.Command, args []string, ignoreArgLen bool,
specifiedIDFile = true
}
+ if c.Flags().Changed("filter") {
+ if argLen > 0 {
+ return errors.New("--filter takes no arguments")
+ }
+ return nil
+ }
+
if specifiedIDFile && (specifiedAll || specifiedLatest) {
return fmt.Errorf("--all, --latest, and --%s cannot be used together", idFileFlag)
} else if specifiedAll && specifiedLatest {