diff --git a/cmd/crictl/main.go b/cmd/crictl/main.go index fb5868f661..ee62f757c0 100644 --- a/cmd/crictl/main.go +++ b/cmd/crictl/main.go @@ -20,6 +20,7 @@ import ( "fmt" "net" "os" + "sort" "time" "github.com/Sirupsen/logrus" @@ -200,6 +201,12 @@ func main() { } return nil } + // sort all flags + for _, cmd := range app.Commands { + sort.Sort(cli.FlagsByName(cmd.Flags)) + } + sort.Sort(cli.FlagsByName(app.Flags)) + if err := app.Run(os.Args); err != nil { logrus.Fatal(err) }