mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
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/+/3692864 Reviewed-by: Bruce Dawson <brucedawson@chromium.org> Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com> Commit-Queue: Will Cassella <cassew@chromium.org> Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user