1
0
Эх сурвалжийг харах

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

Signed-off-by: Matthew Walowski <[email protected]>
Matthew Walowski 2 жил өмнө
parent
commit
704a9fd337
1 өөрчлөгдсөн 4 нэмэгдсэн , 0 устгасан
  1. 4 0
      cmd/compose/config.go

+ 4 - 0
cmd/compose/config.go

@@ -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]