NO_COLOR is not respected
kkga opened this issue · 1 comments
kkga commented
Trying to use this as a replacement for fatih/color, but it seems that NO_COLOR
is not respected.
In the screencast below, the yellow lines are styled with gchalk
, while the rest is fatih/color
The style i'm using is roughly like this:
styleHeading, err := gchalk.Style("yellow", "bold")
var sb = strings.Builder{}
sb.WriteString(styleHeading("some text"))
fmt.Println(sb.String())
record_2021-10-06-193917-comp.mp4
jwalton commented
Fixed this in the "supportscolor" dependency. You should be able to upgrade with:
go get -u github.com/jwalton/gchalk
Or, if you rely on supportscolor directly:
go get -u github.com/jwalton/go-supportscolor