Skip to content

Commit

Permalink
fix root.go.golden (#1552)
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor authored Dec 7, 2021
1 parent 1854bb5 commit 36bff0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cobra/cmd/testdata/root.go.golden
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ to quickly create a Cobra application.`,
// Execute adds all child commands to the root command and sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
func Execute() {
cobra.CheckErr(rootCmd.Execute())
err := rootCmd.Execute()
if err != nil {
os.Exit(1)
}
}

func init() {
Expand Down

0 comments on commit 36bff0a

Please sign in to comment.