Skip to content

Commit

Permalink
fix(help): initialize default help cmd early (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsimansk authored Feb 13, 2020
1 parent 7573a07 commit 8bca0bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/kn/core/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ func NewKnCommand(params ...commands.KnParams) *cobra.Command {
rootCmd.AddCommand(source.NewSourceCommand(p))
rootCmd.AddCommand(trigger.NewTriggerCommand(p))

// Initialize default `help` cmd early to prevent unknown command errors
rootCmd.InitDefaultHelpCmd()

// Deal with empty and unknown sub command groups
EmptyAndUnknownSubCommands(rootCmd)

Expand Down

0 comments on commit 8bca0bd

Please sign in to comment.