Skip to content

Commit

Permalink
don't filter by services if no filter was set
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
  • Loading branch information
ndeloof committed Jan 6, 2023
1 parent 96bbda9 commit a752ef0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/compose/ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ func (s *composeService) Ps(ctx context.Context, projectName string, options api
}
}

if len(options.Services) == 0 {
options.Services = project.ServiceNames()
if len(options.Services) != 0 {
containers = containers.filter(isService(options.Services...))
}

containers = containers.filter(isService(options.Services...))
summary := make([]api.ContainerSummary, len(containers))
eg, ctx := errgroup.WithContext(ctx)
for i, container := range containers {
Expand Down

0 comments on commit a752ef0

Please sign in to comment.