cli stderr output for Execute

This commit is contained in:
rigel rozanski 2017-05-26 13:48:37 -04:00
parent 462243e31a
commit c76dca0456
1 changed files with 2 additions and 2 deletions

View File

@ -93,9 +93,9 @@ func (e Executor) Execute() error {
if err != nil {
// TODO: something cooler with log-levels
if viper.GetBool(TraceFlag) {
fmt.Printf("ERROR: %+v\n", err)
fmt.Fprintf(os.Stderr, "ERROR: %+v\n", err)
} else {
fmt.Println("ERROR:", err.Error())
fmt.Fprintf(os.Stderr, "ERROR: %v\n", err)
}
}
return err