Skip to content

Commit

Permalink
Use project.ServiceNames() if no service specified in hash
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Walowski <mattwalowski@gmail.com>
  • Loading branch information
mattwalo32 committed Oct 27, 2023
1 parent d9e0e42 commit bf26515
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/compose/config.go
Expand Up @@ -190,6 +190,10 @@ func runHash(ctx context.Context, dockerCli command.Cli, opts configOptions) err
return err
}

if len(services) == 0 {
services = project.ServiceNames()
}

Check warning on line 195 in cmd/compose/config.go

View check run for this annotation

Codecov / codecov/patch

cmd/compose/config.go#L193-L195

Added lines #L193 - L195 were not covered by tests

sorted := services
sort.Slice(sorted, func(i, j int) bool {
return sorted[i] < sorted[j]
Expand Down

0 comments on commit bf26515

Please sign in to comment.