diff options
Diffstat (limited to 'cmd/podman/pod_ps.go')
-rw-r--r-- | cmd/podman/pod_ps.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cmd/podman/pod_ps.go b/cmd/podman/pod_ps.go index 70e077651..a956882cf 100644 --- a/cmd/podman/pod_ps.go +++ b/cmd/podman/pod_ps.go @@ -8,8 +8,8 @@ import ( "strings" "time" + "github.com/containers/buildah/pkg/formats" "github.com/containers/libpod/cmd/podman/cliconfig" - "github.com/containers/libpod/cmd/podman/formats" "github.com/containers/libpod/cmd/podman/shared" "github.com/containers/libpod/libpod" "github.com/containers/libpod/pkg/adapter" @@ -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 { @@ -133,6 +134,7 @@ var ( func init() { podPsCommand.Command = _podPsCommand + podPsCommand.SetHelpTemplate(HelpTemplate()) podPsCommand.SetUsageTemplate(UsageTemplate()) flags := podPsCommand.Flags() flags.BoolVar(&podPsCommand.CtrNames, "ctr-names", false, "Display the container names") @@ -160,10 +162,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, |