fix: Correctly print colored text on Windows
This commit will fix #40.
Replacing os.Stdout with color.Output will fix the problem on Windows's console.
Internally, `color.Output` is same as `colorable.NewColorableStdout()`, according to acd5f3bb28/color.go (L25-L27)
see also: https://godocs.io/github.com/mattn/go-colorable#NewColorableStdout
This commit is contained in:
parent
218eb0233a
commit
2cf9e7bf2c
2 changed files with 2 additions and 3 deletions
|
@ -100,7 +100,7 @@ func renderCustomHelp() {
|
|||
// should ideally never happen.
|
||||
panic(err)
|
||||
}
|
||||
err = tmpl.Execute(os.Stdout, helpTmplVars)
|
||||
err = tmpl.Execute(color.Output, helpTmplVars)
|
||||
if err != nil {
|
||||
// should ideally never happen.
|
||||
panic(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue