Commit 8199bccb authored by Will Cassella's avatar Will Cassella Committed by LUCI CQ

Warn when depot_tools is not a git directory

It's sometimes possible to end up with a depot_tools checkout that isn't
a git repository, which breaks the update mechanism. Rather than
allowing the updater to silently fail and have things break several
weeks/months later, we should emit a warning.

Bug: 1333997
Change-Id: I70ae4f3b479e24b87987847927184687caf08b33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3692864Reviewed-by: 's avatarBruce Dawson <brucedawson@chromium.org>
Reviewed-by: 's avatarAravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Will Cassella <cassew@chromium.org>
Reviewed-by: 's avatarBrian Sheedy <bsheedy@chromium.org>
parent 4c0c3fbb
......@@ -130,6 +130,9 @@ if [ "X$DEPOT_TOOLS_UPDATE" != "X0" ]; then
cd "$base_dir"
update_git_repo
cd - > /dev/null
else
echo "Warning: Your depot_tools directory does not appear to be a git repository, and cannot be updated." 1>&2
echo "Consider deleting your depot_tools directory and following the instructions at https://www.chromium.org/developers/how-tos/install-depot-tools/ to reinstall it." 1>&2
fi
# Sync CIPD-boostrapped packages.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment