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
  • Loading branch information
mattwalo32 committed Oct 27, 2023
1 parent d9e0e42 commit 1d562dc
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()
}

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

0 comments on commit 1d562dc

Please sign in to comment.