Skip to content

Commit

Permalink
Merge pull request #7292 from linkvt/fix-missing-global-options
Browse files Browse the repository at this point in the history
Show all global flags in options command
  • Loading branch information
medyagh authored Mar 28, 2020
2 parents da1d411 + 2420bb1 commit 801d49a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmd/minikube/cmd/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ var optionsCmd = &cobra.Command{
// runOptions handles the executes the flow of "minikube options"
func runOptions(cmd *cobra.Command, args []string) {
out.String("The following options can be passed to any command:\n\n")
for _, flagName := range viperWhiteList {
f := pflag.Lookup(flagName)
out.String(flagUsage(f))
}
cmd.Root().PersistentFlags().VisitAll(func(flag *pflag.Flag) {
out.String(flagUsage(flag))
})
}

func flagUsage(flag *pflag.Flag) string {
Expand Down

0 comments on commit 801d49a

Please sign in to comment.