Fix subproject initialization without git installed.

pull/4549/head
Elliott Sales de Andrade 6 years ago committed by Jussi Pakkanen
parent e629a4ad1d
commit e58f186121
  1. 7
      mesonbuild/wrap/wrap.py

@ -41,8 +41,11 @@ def build_ssl_context():
return ctx
def quiet_git(cmd, workingdir):
pc = subprocess.Popen(['git', '-C', workingdir] + cmd, stdin=subprocess.DEVNULL,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
try:
pc = subprocess.Popen(['git', '-C', workingdir] + cmd, stdin=subprocess.DEVNULL,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
except FileNotFoundError as e:
return False, str(e)
out, err = pc.communicate()
if pc.returncode != 0:
return False, err

Loading…
Cancel
Save