Skip to content

Commit

Permalink
check git in bootstrap.py when trying to update submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
Guanqun Lu committed Sep 9, 2019
1 parent 824383d commit b117bd7
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 b117bd7

Please sign in to comment.