forked from rosa/hakurei
internal/rosa/package/meson: respect CLICOLOR_FORCE
Upstream had ticket and patch available since 2017, still unmerged and refuses to support the environment variable, so patch it in. This also strips out the variable for test execution to work around buggy test suites like glib. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py
|
||||
index e1d998a5d..83d6cf9d2 100644
|
||||
--- a/mesonbuild/mlog.py
|
||||
+++ b/mesonbuild/mlog.py
|
||||
@@ -404,6 +404,8 @@ class _Logger:
|
||||
_colorize_console = os.isatty(output.fileno()) and _windows_ansi()
|
||||
else:
|
||||
_colorize_console = os.isatty(output.fileno()) and os.environ.get('TERM', 'dumb') != 'dumb'
|
||||
+ if os.environ.get('CLICOLOR_FORCE', '') != '':
|
||||
+ _colorize_console = True
|
||||
except Exception:
|
||||
_colorize_console = False
|
||||
output.colorize_console = _colorize_console # type: ignore
|
||||
Reference in New Issue
Block a user