Skip to content

Commit

Permalink
ticdc/server: output the cdc server cmd error to stderr (#3520) (#3873)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot committed Jan 19, 2022
1 parent 8934515 commit 0cf9c95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/client.go
Expand Up @@ -282,9 +282,9 @@ func loop() {
command.SetArgs(args)
_ = command.ParseFlags(args)
command.SetOut(os.Stdout)
command.SetErr(os.Stdout)
command.SetErr(os.Stderr)
if err = command.Execute(); err != nil {
command.Println(err)
command.PrintErr(err.Error() + "\n")
}
}
}
2 changes: 1 addition & 1 deletion cmd/root.go
Expand Up @@ -31,7 +31,7 @@ func Execute() {
// Outputs cmd.Print to stdout.
rootCmd.SetOut(os.Stdout)
if err := rootCmd.Execute(); err != nil {
rootCmd.Println(err)
rootCmd.PrintErr(err.Error() + "\n")
os.Exit(1)
}
}

0 comments on commit 0cf9c95

Please sign in to comment.