aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mlog.py
diff options
context:
space:
mode:
authorMichal Sojka <sojkam1@fel.cvut.cz>2017-03-05 23:22:19 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2017-03-08 06:37:42 -0500
commit1713aef364560c9de922991716880e4db32f88a5 (patch)
tree4c04244206acd0592a0e90e1c48cb77874dcc4cc /mesonbuild/mlog.py
parent48d371bd19ce990d04c42ca6f303d1180b843b6b (diff)
downloadmeson-1713aef364560c9de922991716880e4db32f88a5.zip
meson-1713aef364560c9de922991716880e4db32f88a5.tar.gz
meson-1713aef364560c9de922991716880e4db32f88a5.tar.bz2
Do not colorize output on dumb terminals
Dumb terminal is provided e.g. by Emacs for programs run within it.
Diffstat (limited to 'mesonbuild/mlog.py')
-rw-r--r--mesonbuild/mlog.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py
index 843f366..bad756a 100644
--- a/mesonbuild/mlog.py
+++ b/mesonbuild/mlog.py
@@ -18,7 +18,8 @@ import sys, os, platform, io
information about Meson runs. Some output goes to screen,
some to logging dir and some goes to both."""
-colorize_console = platform.system().lower() != 'windows' and os.isatty(sys.stdout.fileno())
+colorize_console = platform.system().lower() != 'windows' and os.isatty(sys.stdout.fileno()) and \
+ os.environ.get('TERM') != 'dumb'
log_dir = None
log_file = None