Skip to content

Commit 704a9fd

Browse files
mattwalo32ndeloof
authored andcommitted
Use project.ServiceNames() if no service specified in hash
Signed-off-by: Matthew Walowski <[email protected]>
1 parent d9e0e42 commit 704a9fd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/compose/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ func runHash(ctx context.Context, dockerCli command.Cli, opts configOptions) err
190190
return err
191191
}
192192

193+
if len(services) == 0 {
194+
services = project.ServiceNames()
195+
}
196+
193197
sorted := services
194198
sort.Slice(sorted, func(i, j int) bool {
195199
return sorted[i] < sorted[j]

0 commit comments

Comments
 (0)