Skip to content

Commit

Permalink
Rollup merge of rust-lang#64278 - guanqun:check-git, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
check git in bootstrap.py
  • Loading branch information
Centril authored Sep 9, 2019
2 parents 7e98ec5 + b117bd7 commit 1769a42
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,14 @@ def update_submodules(self):
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:
Expand Down

0 comments on commit 1769a42

Please sign in to comment.