Error messages should always be printed to os.Stderr.

This commit is contained in:
Alessio Treglia 2020-04-12 09:57:15 +01:00
parent d7b65d7b73
commit bf23a831eb
No known key found for this signature in database
GPG key ID: E8A48AE5311D765A

View file

@ -198,7 +198,7 @@ var rootCmd = &cobra.Command{
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}