diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-09-03 21:28:00 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-09-03 21:12:09 +0300 |
commit | e7b25018c4715e538234d4ba51e32194b4757388 (patch) | |
tree | 5543d6d0ff60b28758ce98485db00f5894ac5c2a /mesonbuild/wrap/wrap.py | |
parent | fb2d2b6eab7fcfc2aff08417b6abbf2ea975b3c9 (diff) | |
download | meson-e7b25018c4715e538234d4ba51e32194b4757388.zip meson-e7b25018c4715e538234d4ba51e32194b4757388.tar.gz meson-e7b25018c4715e538234d4ba51e32194b4757388.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.
Diffstat (limited to 'mesonbuild/wrap/wrap.py')
-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 412097c..42808e3 100644 --- a/mesonbuild/wrap/wrap.py +++ b/mesonbuild/wrap/wrap.py @@ -41,7 +41,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: |