From ee5b749e653f4c78298d1e290d5a1ae03edc3c05 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Mon, 3 Feb 2020 22:39:50 -0500 Subject: 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 --- cmd/podman/ps.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd') 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 { -- cgit v1.2.3-54-g00ecf