From e8fe98d936ba3eac118c89c26131883a502bf409 Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Tue, 27 Nov 2018 10:12:52 +0100 Subject: [PATCH] Fix help display with -h. --- cmd/odo/odo.go | 2 +- pkg/odo/cli/cli.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/odo/odo.go b/cmd/odo/odo.go index 7648a3317..7b53f4d1e 100644 --- a/cmd/odo/odo.go +++ b/cmd/odo/odo.go @@ -34,7 +34,7 @@ func main() { } // parse the flags - both the program's flags and the completion flags - flag.Parse() + flag.CommandLine.Parse([]string{}) // run the completion, in case that the completion was invoked // and ran as a completion script or handled a flag that passed diff --git a/pkg/odo/cli/cli.go b/pkg/odo/cli/cli.go index bb6bdef5f..67f88ad65 100644 --- a/pkg/odo/cli/cli.go +++ b/pkg/odo/cli/cli.go @@ -88,7 +88,6 @@ func NewCmdOdo(name, fullName string) *cobra.Command { verbosity.Usage += ". Level varies from 0 to 9 (default 0)." rootCmd.SetUsageTemplate(rootUsageTemplate) - flag.CommandLine.Parse([]string{}) rootCmd.AddCommand( application.NewCmdApplication(),