repo: only warn if update_depot_tools does not exist

It looks like some bots don't have this for whatever reason.

Bug: 1148984
Change-Id: I7ff826e0a0df78e3be9e1f84698b69574c75f71c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2567384
Reviewed-by: Sean McAllister <smcallis@google.com>
Reviewed-by: LaMont Jones <lamontjones@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
Mike Frysinger
2020-12-01 20:22:18 +00:00
committed by LUCI CQ
parent 684460d29e
commit 80cea4f5fc

6
repo
View File

@@ -35,7 +35,11 @@ def _UpdateDepotTools():
return
path = path.parent
subprocess.run([UPDATE_DEPOT_TOOLS], check=True)
if UPDATE_DEPOT_TOOLS.exists():
subprocess.run([UPDATE_DEPOT_TOOLS], check=True)
else:
print(f'warning: {UPDATE_DEPOT_TOOLS} does not exist; export '
'DEPOT_TOOLS_UPDATE=0 to disable.', file=sys.stderr)
def main(argv):