From 4a1a7b086eca841a8ee3594e3c0ba0a85acb35c4 Mon Sep 17 00:00:00 2001 From: Albert Nigmatzianov Date: Sun, 28 May 2017 12:23:49 +0200 Subject: [PATCH] cmd: Don't print errors from execute to prevent duplication of errors --- cobra/cmd/root.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cobra/cmd/root.go b/cobra/cmd/root.go index 1746b09c..716a59ae 100644 --- a/cobra/cmd/root.go +++ b/cobra/cmd/root.go @@ -36,9 +36,7 @@ to quickly create a Cobra application.`, // Execute executes the root command. func Execute() { - if err := rootCmd.Execute(); err != nil { - er(err) - } + rootCmd.Execute() } func init() {