Skip to content

Commit 82b7f2a

Browse files
author
Shlomi Noach
authored
Merge pull request #517 from akshaychhajed/help-output-stdout
Thank you!
2 parents ca2340a + 05fc358 commit 82b7f2a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

go/cmd/gh-ost/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,15 @@ func main() {
121121
version := flag.Bool("version", false, "Print version & exit")
122122
checkFlag := flag.Bool("check-flag", false, "Check if another flag exists/supported. This allows for cross-version scripting. Exits with 0 when all additional provided flags exist, nonzero otherwise. You must provide (dummy) values for flags that require a value. Example: gh-ost --check-flag --cut-over-lock-timeout-seconds --nice-ratio 0")
123123
flag.StringVar(&migrationContext.ForceTmpTableName, "force-table-names", "", "table name prefix to be used on the temporary tables")
124+
flag.CommandLine.SetOutput(os.Stdout)
124125

125126
flag.Parse()
126127

127128
if *checkFlag {
128129
return
129130
}
130131
if *help {
131-
fmt.Fprintf(os.Stderr, "Usage of gh-ost:\n")
132+
fmt.Fprintf(os.Stdout, "Usage of gh-ost:\n")
132133
flag.PrintDefaults()
133134
return
134135
}

0 commit comments

Comments
 (0)