From 5c29c3614d0db699cf0a204619aa75c5c3cfc729 Mon Sep 17 00:00:00 2001 From: Mark Bates Date: Fri, 27 Jan 2017 17:59:01 +0100 Subject: [PATCH] better error printing. --- buffalo/cmd/root.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buffalo/cmd/root.go b/buffalo/cmd/root.go index 17562865f..da9cf01ed 100644 --- a/buffalo/cmd/root.go +++ b/buffalo/cmd/root.go @@ -33,8 +33,9 @@ var cfgFile string // RootCmd is the hook for all of the other commands in the buffalo binary. var RootCmd = &cobra.Command{ - Use: "buffalo", - Short: "Helps you build your Buffalo applications that much easier!", + SilenceErrors: true, + Use: "buffalo", + Short: "Helps you build your Buffalo applications that much easier!", PersistentPreRun: func(cmd *cobra.Command, args []string) { fmt.Printf("Buffalo version %s\n\n", Version) }, @@ -44,6 +45,7 @@ var RootCmd = &cobra.Command{ // This is called by main.main(). It only needs to happen once to the rootCmd. func Execute() { if err := RootCmd.Execute(); err != nil { + fmt.Printf("Error: %s\n\n", err) os.Exit(-1) } }