Skip to content

Commit 6649e9d

Browse files
authored
Make explicit "mkcert -help" print to stdout (#265)
Currently "mkcert -help" prints to stderr, which is rather annoying as: $ mkcert -help | less Gives us a blank page, as it pipes only stdout. To get any results in less I need to use: $ mkcert 2>&1 | less $ mkcert |& less # Non-standard bash/ zsh Since the user explicitly asked for help with -help, it doesn't make much sense to output it to stderr IMHO.
1 parent 3fa4d18 commit 6649e9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ func main() {
106106
}
107107
flag.Parse()
108108
if *helpFlag {
109-
fmt.Fprint(flag.CommandLine.Output(), shortUsage)
110-
fmt.Fprint(flag.CommandLine.Output(), advancedUsage)
109+
fmt.Print(shortUsage)
110+
fmt.Print(advancedUsage)
111111
return
112112
}
113113
if *versionFlag {

0 commit comments

Comments
 (0)