1
Fork 0

Rollup merge of #64278 - guanqun:check-git, r=Mark-Simulacrum

check git in bootstrap.py
This commit is contained in:
Mazdak Farrokhzad 2019-09-09 17:42:26 +02:00 committed by GitHub
commit 1769a425fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -708,6 +708,14 @@ class RustBuild(object):
if (not os.path.exists(os.path.join(self.rust_root, ".git"))) or \
self.get_toml('submodules') == "false":
return
# check the existence of 'git' command
try:
subprocess.check_output(['git', '--version'])
except (subprocess.CalledProcessError, OSError):
print("error: `git` is not found, please make sure it's installed and in the path.")
sys.exit(1)
slow_submodules = self.get_toml('fast-submodules') == "false"
start_time = time()
if slow_submodules: