mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-20 10:57:09 +00:00
Send error messages to stderr. #249
This commit is contained in:
1 parent
5cd3c33854
commit
78b6d6ca7b
1 file changed
+2
-1
+2
-1
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
ctx "github.com/smira/aptly/context"
|
||||
"github.com/smira/commander"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Run runs single command starting from root cmd with args, optionally initializing context
|
||||
@@ -14,7 +15,7 @@ func Run(cmd *commander.Command, cmdArgs []string, initContext bool) (returnCode
|
||||
if !ok {
|
||||
panic(r)
|
||||
}
|
||||
fmt.Println("ERROR:", fatal.Message)
|
||||
fmt.Fprintln(os.Stderr, "ERROR:", fatal.Message)
|
||||
returnCode = fatal.ReturnCode
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in new issue
Block a user