From 91da3b20466cb3051275939b0bdbee04ef3948d7 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Wed, 12 Mar 2014 18:15:18 +0400 Subject: [PATCH] Don't exit if returnCode is 0: otherwise panic is not reported. --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 9b7a1632..09e669ad 100644 --- a/main.go +++ b/main.go @@ -60,7 +60,9 @@ func main() { if errorMessage != "" { fmt.Print(errorMessage) } - os.Exit(returnCode) + if returnCode != 0 { + os.Exit(returnCode) + } }() command := cmd.RootCommand()