Jelajahi Sumber

pass All option to backend api.Service when length statuses is not equal to zero

Signed-off-by: 1arp <[email protected]>
1arp 1 tahun lalu
induk
melakukan
3ba66453d2
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      cmd/compose/ps.go

+ 1 - 1
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 {