diff options
| author | Guillaume Melquiond | 2016-08-11 09:37:29 +0200 |
|---|---|---|
| committer | Guillaume Melquiond | 2016-08-11 09:37:29 +0200 |
| commit | c90c53129436014b0020c52641277d616144282a (patch) | |
| tree | 81648d67178f39e925b659ebf74e50d91796562e | |
| parent | e154bf3505658b59c1cce53bd3061586bc353449 (diff) | |
Do not assume the "TERM" environment variable is always set (bug #5007).
| -rw-r--r-- | toplevel/coqtop.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml index 9e1a76bbd6..3d5080177c 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 |
