Use project.ServiceNames() if no service specified in hash

Signed-off-by: Matthew Walowski <mattwalowski@gmail.com>
This commit is contained in:
Matthew Walowski 2023-10-27 10:46:00 -05:00 committed by Nicolas De loof
parent d9e0e42d95
commit 704a9fd337
1 changed files with 4 additions and 0 deletions

View File

@ -190,6 +190,10 @@ func runHash(ctx context.Context, dockerCli command.Cli, opts configOptions) err
return err return err
} }
if len(services) == 0 {
services = project.ServiceNames()
}
sorted := services sorted := services
sort.Slice(sorted, func(i, j int) bool { sort.Slice(sorted, func(i, j int) bool {
return sorted[i] < sorted[j] return sorted[i] < sorted[j]