Skip to content

Commit

Permalink
Add a FORCE_COLOR check
Browse files Browse the repository at this point in the history
If fatih/color#155 is ever accepted, this will no longer be nessessary
  • Loading branch information
donatj committed Feb 10, 2023
1 parent 2769386 commit e8013a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/chksutil/main.go
Expand Up @@ -18,6 +18,11 @@ func main() {
subcommands.Register(&listCmd{}, "")
subcommands.Register(&statsCmd{}, "")

fc := os.Getenv("FORCE_COLOR")
if fc != "" && fc != "0" {
color.NoColor = false
}

nocolor := flag.Bool("no-color", false, "Disable colorized output")
flag.Parse()
if *nocolor {
Expand Down

0 comments on commit e8013a9

Please sign in to comment.