From 36bff0a4d54129f4d26b47f6700829f8ac652f19 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral <38422348+umarcor@users.noreply.github.com> Date: Tue, 7 Dec 2021 23:24:06 +0000 Subject: [PATCH] fix root.go.golden (#1552) --- 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 2adeaea5..381628ab 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() {