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 <[email protected]>
  • Loading branch information
mattwalo32 authored and ndeloof committed Oct 27, 2023
1 parent d9e0e42 commit 704a9fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/compose/config.go
Original file line number Diff line number Diff line change
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()
}

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

0 comments on commit 704a9fd

Please sign in to comment.