Skip to content

Commit

Permalink
fix: handle missing CLICOLOR_FORCE correctly (#6781)
Browse files Browse the repository at this point in the history
when this variable is absent, we should not force colors

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg authored Dec 27, 2022
1 parent 8a4a113 commit cc12f0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion otherlibs/stdune/ansi_color.ml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ let supports_color isatty =
| _ -> true
and clicolor_force =
match Env.(get initial) "CLICOLOR_FORCE" with
| Some "0" -> false
| None | Some "0" -> false
| _ -> true
in
clicolor_force || (is_smart && clicolor && Lazy.force isatty)
Expand Down

0 comments on commit cc12f0d

Please sign in to comment.