mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
[win-bootstrap] Exit with error if no Git in PATH
Bug: b/360206460 Change-Id: I5da52de0e050f4e6b9e484052d1e9ddacb79e8ad Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6171044 Reviewed-by: Josip Sokcevic <sokcevic@chromium.org> Reviewed-by: Allen Li <ayatane@chromium.org> Commit-Queue: Anne Redulla <aredulla@google.com>
This commit is contained in:
@@ -485,12 +485,13 @@ def main(argv):
|
||||
clean_up_old_installations(bootstrap_dir)
|
||||
|
||||
if IS_WIN:
|
||||
# Search for a Git installation.
|
||||
git_dir = search_win_git_directory()
|
||||
if not git_dir:
|
||||
# Either using system git was not enabled
|
||||
# or git was not found in PATH.
|
||||
# Fall back to depot_tools bundled git.
|
||||
git_dir = os.path.join(bootstrap_dir, 'git')
|
||||
logging.error('Failed to bootstrap depot_tools.\n'
|
||||
'Git was not found in PATH. Have you installed it?')
|
||||
return 1
|
||||
|
||||
template = template._replace(GIT_BIN_ABSDIR=git_dir)
|
||||
git_postprocess(template)
|
||||
templates = [
|
||||
|
||||
Reference in New Issue
Block a user