Skip to content

Commit

Permalink
fix: Silence usage on errors
Browse files Browse the repository at this point in the history
  • Loading branch information
scuzhanglei committed Nov 7, 2022
1 parent 8aadee4 commit b0274ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ func main() {
cmdVersion.PersistentFlags().StringVarP(&versionOutput, "output", "o", versionOutput, "Output format; available options are 'json'")

rootCmd := &cobra.Command{
Use: "knest",
Use: "knest",
SilenceUsage: true,
}
rootCmd.PersistentFlags().StringVarP(&targetNamespace, "target-namespace", "n", targetNamespace, "The namespace to use for the nested cluster.")
rootCmd.AddCommand(cmdCreate)
Expand All @@ -319,7 +320,6 @@ func main() {
rootCmd.AddCommand(cmdVersion)

if err := rootCmd.Execute(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
Expand Down

0 comments on commit b0274ce

Please sign in to comment.