diff --git a/cmd/tk/env.go b/cmd/tk/env.go index 83608a0b6..4b0d185d3 100644 --- a/cmd/tk/env.go +++ b/cmd/tk/env.go @@ -5,6 +5,7 @@ import ( "fmt" "os" "path/filepath" + "sort" "text/tabwriter" "github.com/go-clix/cli" @@ -248,6 +249,7 @@ func envListCmd() *cli.Command { if err != nil { return err } + sort.SliceStable(envs, func(i, j int) bool { return envs[i].Metadata.Name < envs[j].Metadata.Name }) if *useJSON { j, err := json.Marshal(envs)