mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-06 04:08:40 +00:00
check git in bootstrap.py when trying to update submodule
This commit is contained in:
parent
824383d4ab
commit
b117bd7366
@ -708,6 +708,14 @@ class RustBuild(object):
|
|||||||
if (not os.path.exists(os.path.join(self.rust_root, ".git"))) or \
|
if (not os.path.exists(os.path.join(self.rust_root, ".git"))) or \
|
||||||
self.get_toml('submodules') == "false":
|
self.get_toml('submodules') == "false":
|
||||||
return
|
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"
|
slow_submodules = self.get_toml('fast-submodules') == "false"
|
||||||
start_time = time()
|
start_time = time()
|
||||||
if slow_submodules:
|
if slow_submodules:
|
||||||
|
Loading…
Reference in New Issue
Block a user