Any non-empty value should be a disabling intent.

Conforms to the informal standard proposed in https://no-color.org
This commit is contained in:
Brett Buddin 2020-04-02 20:31:02 -04:00
parent 21e445beab
commit 48e7df2337
No known key found for this signature in database
GPG key ID: C51265E441C4C5AC

View file

@ -44,7 +44,7 @@ func makeColorFunc(color string) func(string) string {
func isColorEnabled() bool {
if !checkedNoColor {
_isColorEnabled = os.Getenv("NO_COLOR") != "1"
_isColorEnabled = os.Getenv("NO_COLOR") == ""
checkedNoColor = true
}
return _isColorEnabled