From cc12f0d2783c1074003e18f155ec653c67fed7af Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 26 Dec 2022 23:51:16 -0600 Subject: [PATCH] fix: handle missing CLICOLOR_FORCE correctly (#6781) when this variable is absent, we should not force colors Signed-off-by: Rudi Grinberg --- otherlibs/stdune/ansi_color.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otherlibs/stdune/ansi_color.ml b/otherlibs/stdune/ansi_color.ml index 0b03bdc1b72..638afbbfd27 100644 --- a/otherlibs/stdune/ansi_color.ml +++ b/otherlibs/stdune/ansi_color.ml @@ -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)