Skip to content

Commit 67bfbe5

Browse files
committed
guarantee stable sorting of services - alphabetical
1 parent 0e9431f commit 67bfbe5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

commands/cloud_setup.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"kool-dev/kool/services/compose"
1111
"os"
1212
"path/filepath"
13+
"slices"
1314
"strconv"
1415
"strings"
1516

@@ -86,7 +87,15 @@ func (s *KoolCloudSetup) Execute(args []string) (err error) {
8687

8788
var hasPublicPort bool = false
8889

90+
var serviceNames []string
91+
8992
for serviceName = range composeConfig.Services {
93+
serviceNames = append(serviceNames, serviceName)
94+
}
95+
96+
slices.Sort[[]string](serviceNames)
97+
98+
for _, serviceName = range serviceNames {
9099
var (
91100
confirmed bool
92101
isPublic bool = false

0 commit comments

Comments
 (0)