diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-02-13 20:51:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-13 20:51:22 +0100 |
commit | 3e0475eb8891499630d0eefb9b133a1356e7abac (patch) | |
tree | abd15ff65758becdc2484b0a0e0741b15a8159b0 /cmd/podman | |
parent | e4e5efc12b7902a22561170ca59f3da90b7b80ce (diff) | |
parent | d2100cd47359ef0afa1a25f6f3a6a7708cd855f7 (diff) | |
download | podman-3e0475eb8891499630d0eefb9b133a1356e7abac.tar.gz podman-3e0475eb8891499630d0eefb9b133a1356e7abac.tar.bz2 podman-3e0475eb8891499630d0eefb9b133a1356e7abac.zip |
Merge pull request #5189 from mheon/only_set_all_on_status
Only set --all when a status filter is given to ps
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/ps.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go index d93ccc24c..accd5b51a 100644 --- a/cmd/podman/ps.go +++ b/cmd/podman/ps.go @@ -205,9 +205,15 @@ func checkFlagsPassed(c *cliconfig.PsValues) error { if c.Last >= 0 && c.Latest { return errors.Errorf("last and latest are mutually exclusive") } - // Filter forces all + // Filter on status forces all if len(c.Filter) > 0 { - c.All = true + for _, filter := range c.Filter { + splitFilter := strings.SplitN(filter, "=", 2) + if strings.ToLower(splitFilter[0]) == "status" { + c.All = true + break + } + } } // Quiet conflicts with size and namespace and is overridden by a Go // template. |