Skip to content

Commit f7b99ad

Browse files
committed
Changed the usage printing to stderr if it is not from -h or --help
1 parent 854c423 commit f7b99ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docopt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func Parse(doc string, argv []string, help bool, version string,
5252
args, output, err := parse(doc, argv, help, version, optionsFirst)
5353
if _, ok := err.(*UserError); ok {
5454
// the user gave us bad input
55-
fmt.Println(output)
55+
fmt.Fprintln(os.Stderr, output)
5656
if exitOk {
5757
os.Exit(1)
5858
}

0 commit comments

Comments
 (0)