aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mlog.py
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-12-06 23:42:45 +0000
committerXavier Claessens <xclaesse@gmail.com>2022-12-12 08:14:18 -0500
commit41ab2ef8af22020d28153ab5872dbc5bef4d491e (patch)
treeba08c4e66f535b3c3b3442da853893b3b5d649d7 /mesonbuild/mlog.py
parent8bfc29f91f7c0bde514dd880a6c58b702e0708c7 (diff)
downloadmeson-41ab2ef8af22020d28153ab5872dbc5bef4d491e.zip
meson-41ab2ef8af22020d28153ab5872dbc5bef4d491e.tar.gz
meson-41ab2ef8af22020d28153ab5872dbc5bef4d491e.tar.bz2
mlog: set LV environment variable for pager.
Diffstat (limited to 'mesonbuild/mlog.py')
-rw-r--r--mesonbuild/mlog.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py
index 9b57ffb..2b310ec 100644
--- a/mesonbuild/mlog.py
+++ b/mesonbuild/mlog.py
@@ -436,6 +436,9 @@ def start_pager() -> None:
env = os.environ.copy()
if 'LESS' not in env:
env['LESS'] = 'RXF'
+ # Set "-c" for lv to support color
+ if 'LV' not in env:
+ env['LV'] = '-c'
log_pager = subprocess.Popen(pager_cmd, stdin=subprocess.PIPE,
text=True, encoding='utf-8', env=env)
except Exception as e: