summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Sales de Andrade <quantum.analyst@gmail.com>2018-11-22 03:04:09 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2018-11-22 22:31:54 +0200
commite58f18612148efa356ec8b6b1f09038fae6853ae (patch)
tree0da04a2d1f4ec940df639155b0d13a096fd42551
parente629a4ad1d4d2b9942ff44894b8aaaa05146e033 (diff)
downloadmeson-e58f18612148efa356ec8b6b1f09038fae6853ae.tar.gz
Fix subproject initialization without git installed.
-rw-r--r--mesonbuild/wrap/wrap.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index 6d4982042..7cad90470 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/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