diff options
author | Matthew Heon <mheon@redhat.com> | 2020-02-03 22:39:50 -0500 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2020-02-04 09:52:25 -0500 |
commit | ee5b749e653f4c78298d1e290d5a1ae03edc3c05 (patch) | |
tree | 997b4c37b9fbe5d9cac564f62c241750c9950d40 /cmd/podman | |
parent | c4f6d5615a34ea67b1335a2a446bd09789d98015 (diff) | |
download | podman-ee5b749e653f4c78298d1e290d5a1ae03edc3c05.tar.gz podman-ee5b749e653f4c78298d1e290d5a1ae03edc3c05.tar.bz2 podman-ee5b749e653f4c78298d1e290d5a1ae03edc3c05.zip |
Force --all when --filter is passed to podman ps
When we filter, it should be out of all containers, not just
running ones, by default - this is necessary to ensure Docker
compatability.
Fixes #5050
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/ps.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go index d2c5e19e2..d93ccc24c 100644 --- a/cmd/podman/ps.go +++ b/cmd/podman/ps.go @@ -205,6 +205,10 @@ func checkFlagsPassed(c *cliconfig.PsValues) error { if c.Last >= 0 && c.Latest { return errors.Errorf("last and latest are mutually exclusive") } + // Filter forces all + if len(c.Filter) > 0 { + c.All = true + } // Quiet conflicts with size and namespace and is overridden by a Go // template. if c.Quiet { |