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.
pull/4055/merge
Nirbheek Chauhan 6 years ago committed by Jussi Pakkanen
parent fb2d2b6eab
commit e7b25018c4
  1. 2
      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:

Loading…
Cancel
Save