diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-03-01 12:22:12 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-01 12:22:12 -0800 |
commit | e4746f9b4b679548d88f0ea94f73d760b2658c3c (patch) | |
tree | 7911dcb15acde80a1c03529e7d42a6dcc9cd45f2 /cmd/podman/pod_ps.go | |
parent | ce8d7b8539ec724cce7eac14d5d555c3c3c23266 (diff) | |
parent | 9934507d74c97bccb753b04873eb74652600b6ff (diff) | |
download | podman-e4746f9b4b679548d88f0ea94f73d760b2658c3c.tar.gz podman-e4746f9b4b679548d88f0ea94f73d760b2658c3c.tar.bz2 podman-e4746f9b4b679548d88f0ea94f73d760b2658c3c.zip |
Merge pull request #2452 from edsantiago/no_more_args
Command-line input validation: reject unused args
Diffstat (limited to 'cmd/podman/pod_ps.go')
-rw-r--r-- | cmd/podman/pod_ps.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd/podman/pod_ps.go b/cmd/podman/pod_ps.go index 70e077651..8e48740e6 100644 --- a/cmd/podman/pod_ps.go +++ b/cmd/podman/pod_ps.go @@ -121,6 +121,7 @@ var ( _podPsCommand = &cobra.Command{ Use: "ps", Aliases: []string{"ls", "list"}, + Args: noSubArgs, Short: "List pods", Long: podPsDescription, RunE: func(cmd *cobra.Command, args []string) error { @@ -160,10 +161,6 @@ func podPsCmd(c *cliconfig.PodPsValues) error { } defer runtime.Shutdown(false) - if len(c.InputArgs) > 0 { - return errors.Errorf("too many arguments, ps takes no arguments") - } - opts := podPsOptions{ NoTrunc: c.NoTrunc, Quiet: c.Quiet, |