Skip to content

Commit

Permalink
Overwrite the default --help persistent flag (#634)
Browse files Browse the repository at this point in the history
Signed-off-by: Lonng <[email protected]>
  • Loading branch information
lonng authored Jul 29, 2020
1 parent 5f45fb7 commit ebd7633
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ the latest stable version will be downloaded from the repository.`,
"and the latest version installed will be selected if no version specified")
rootCmd.Flags().StringVarP(&tag, "tag", "T", "", "Specify a tag for component instance")
rootCmd.Flags().StringVar(&binPath, "binpath", "", "Specify the binary path of component instance")
// Some components will define themself -h flag, eg:
// $ tiup dumpling -h ${host}.
// We try to leave the handling of `-h` flag to the component.
rootCmd.PersistentFlags().Bool("help", false, "Help for this command")

rootCmd.AddCommand(
newInstallCmd(),
Expand Down

0 comments on commit ebd7633

Please sign in to comment.