diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-09-03 21:28:00 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-09-05 11:19:52 +0530 |
commit | a08a80d83a9dbcc50d2927ba63ccca4c926933a9 (patch) | |
tree | 5f96344a3be897d0df5800d626d4ad732faa9265 | |
parent | 4d3deb75946f2b4480c46e4ed981b259892b5b0d (diff) | |
download | meson-a08a80d83a9dbcc50d2927ba63ccca4c926933a9.zip meson-a08a80d83a9dbcc50d2927ba63ccca4c926933a9.tar.gz meson-a08a80d83a9dbcc50d2927ba63ccca4c926933a9.tar.bz2 |
wrap: Redirect git's stdin to DEVNULL
Otherwise, git fiddles with the cmd.exe console's color behaviour and
disables it, which causes it to stop interpreting ANSI color codes
outputted by meson for colored output.
Effectively, as soon as any subproject is initialized, cmd.exe goes
nice coloured output to ugly raw ANSI codes.
-rw-r--r-- | mesonbuild/wrap/wrap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py index 54a928e..6c4be4c 100644 --- a/mesonbuild/wrap/wrap.py +++ b/mesonbuild/wrap/wrap.py @@ -40,7 +40,7 @@ def build_ssl_context(): return ctx def quiet_git(cmd, workingdir): - pc = subprocess.Popen(['git', '-C', workingdir] + cmd, + pc = subprocess.Popen(['git', '-C', workingdir] + cmd, stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = pc.communicate() if pc.returncode != 0: |