Skip to content

Commit

Permalink
Merge pull request #170 from cchen666/cchen-dev-fix-order
Browse files Browse the repository at this point in the history
Order the resources in get to fix test failures
  • Loading branch information
gmeghnag authored Jun 12, 2024
2 parents dacc59c + ccf32cf commit 2a7612f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/get/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"fmt"
"io"
"io/ioutil"
"sort"
"strings"

goyaml "gopkg.in/yaml.v2"
Expand Down Expand Up @@ -478,6 +479,7 @@ func handleOutput(w io.Writer) {
includesClusterScoped = true
}
}
sort.Strings(_resources)
resources := strings.Join(_resources, ",")
if vars.OutputStringVar == "json" {
if vars.SingleResource && len(vars.UnstructuredList.Items) == 1 {
Expand Down

0 comments on commit 2a7612f

Please sign in to comment.