From d720d227d67b213c4245f538067db4503ce0a45f Mon Sep 17 00:00:00 2001 From: 1arp Date: Thu, 8 Feb 2024 03:45:47 +0000 Subject: [PATCH] pass All option to backend api.Service when length statuses is not equal to zero Signed-off-by: 1arp --- cmd/compose/ps.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/compose/ps.go b/cmd/compose/ps.go index 8b3f3d34d6..c92243c221 100644 --- a/cmd/compose/ps.go +++ b/cmd/compose/ps.go @@ -113,7 +113,7 @@ func runPs(ctx context.Context, dockerCli command.Cli, backend api.Service, serv containers, err := backend.Ps(ctx, name, api.PsOptions{ Project: project, - All: opts.All, + All: opts.All || len(opts.Status) != 0, Services: services, }) if err != nil {