Skip to content

Commit

Permalink
Fix odo --help
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy committed Aug 3, 2023
1 parent 54c6583 commit 04aba8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/odo/odo.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ func main() {

// add the completion flags to the root command, though they won't appear in completions
root.Flags().AddGoFlagSet(flag.CommandLine)

// override usage so that flag.Parse uses root command's usage instead of default one when invoked with -h
flag.Usage = func() {
flag.CommandLine.Usage = func() {
_ = root.Help()
}

Expand Down

0 comments on commit 04aba8b

Please sign in to comment.