mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-26 13:47:40 +00:00
Send error messages to stderr. #249
This commit is contained in:
+2
-1
@@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
ctx "github.com/smira/aptly/context"
|
ctx "github.com/smira/aptly/context"
|
||||||
"github.com/smira/commander"
|
"github.com/smira/commander"
|
||||||
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Run runs single command starting from root cmd with args, optionally initializing context
|
// 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 {
|
if !ok {
|
||||||
panic(r)
|
panic(r)
|
||||||
}
|
}
|
||||||
fmt.Println("ERROR:", fatal.Message)
|
fmt.Fprintln(os.Stderr, "ERROR:", fatal.Message)
|
||||||
returnCode = fatal.ReturnCode
|
returnCode = fatal.ReturnCode
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|||||||
Reference in New Issue
Block a user