From 87cc2eb264ac1f274a2344ada1f1c26858762e67 Mon Sep 17 00:00:00 2001 From: umarcor Date: Wed, 8 Dec 2021 00:17:42 +0100 Subject: [PATCH] fix root.go.golden --- cobra/cmd/testdata/root.go.golden | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cobra/cmd/testdata/root.go.golden b/cobra/cmd/testdata/root.go.golden index 2adeaea53..381628abe 100644 --- a/cobra/cmd/testdata/root.go.golden +++ b/cobra/cmd/testdata/root.go.golden @@ -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() {