From c90c53129436014b0020c52641277d616144282a Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Thu, 11 Aug 2016 09:37:29 +0200 Subject: Do not assume the "TERM" environment variable is always set (bug #5007). --- toplevel/coqtop.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toplevel') diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml index 9e1a76bbd..3d5080177 100644 --- a/toplevel/coqtop.ml +++ b/toplevel/coqtop.ml @@ -55,7 +55,7 @@ let init_color () = Terminal.has_style Unix.stderr && (* emacs compilation buffer does not support colors by default, its TERM variable is set to "dumb". *) - Unix.getenv "TERM" <> "dumb" + try Sys.getenv "TERM" <> "dumb" with Not_found -> false in if has_color then begin let colors = try Some (Sys.getenv "COQ_COLORS") with Not_found -> None in -- cgit v1.2.3