diff --git a/cmd/dbc/main.go b/cmd/dbc/main.go index 55d072e..1ee442b 100644 --- a/cmd/dbc/main.go +++ b/cmd/dbc/main.go @@ -190,8 +190,8 @@ func failSubcommandAndSuggest(p *arg.Parser, msg string, subcommand ...string) { } } - p.WriteUsageForSubcommand(os.Stdout, subcommand...) - fmt.Fprintf(os.Stdout, "error: %s", msg) + p.WriteUsageForSubcommand(os.Stderr, subcommand...) + fmt.Fprintf(os.Stderr, "error: %s", msg) // Optionally add suggestion if invalidCmd != "" {