mirror of https://github.com/docker/compose.git
Use project.ServiceNames() if no service specified in hash
Signed-off-by: Matthew Walowski <mattwalowski@gmail.com>
This commit is contained in:
parent
d9e0e42d95
commit
704a9fd337
|
@ -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]
|
||||||
|
|
Loading…
Reference in New Issue