mirror of
https://github.com/spf13/cobra
synced 2025-05-07 13:57:21 +00:00
Error messages should always be printed to os.Stderr.
This commit is contained in:
parent
d7b65d7b73
commit
bf23a831eb
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue