Fix help display with -h.

This commit is contained in:
Chris Laprun
2018-11-27 10:12:52 +01:00
parent 7bdfb7bb08
commit e8fe98d936
2 changed files with 1 additions and 2 deletions

View File

@@ -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

View File

@@ -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(),