refactor: sort output of version command

This commit is contained in:
decentral1se 2021-08-25 14:16:33 +02:00
parent b34acefa21
commit 62ceca798c
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package app
import (
"errors"
"fmt"
"sort"
"strings"
abraFormatter "coopcloud.tech/abra/cli/formatter"
@ -85,6 +86,10 @@ var appVersionCommand = &cli.Command{
}
}
sort.SliceStable(compose.Services, func(i, j int) bool {
return compose.Services[i].Name < compose.Services[j].Name
})
for _, service := range compose.Services {
if status, ok := statuses[service.Name]; ok {
statusService := status.Services[0]