Make update_depot_tools tell you if it's skipping an update.

I set DEPOT_TOOLS_UPDATE to 0 because I sometimes contribute to
depot_tools (and because I was negatively impacted a few times in the
past by a depot tools update in ways that I can't recall.)

Anyway, if you set the DEPOT_TOOLS_UPDATE variable to 0, then even
explicitly doing `update_depot_tools` from the command line will not
actually do an update, you need to set the environment variable to a
different value before attempting an update.

This script is so old that its behavior probably shouldn't be changed.
But we can tell the user what update_depot_tools is doing and why, and
how to get it to do a real update.

Change-Id: I67458e78b5e64f8ea75ffad73b2ede0955c4d91f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5824829
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gregory Nisbet <gregorynisbet@google.com>
changes/29/5824829/3
Gregory NISBET 8 months ago committed by LUCI CQ
parent aaaca2863c
commit ae2bc61bf0

@ -119,7 +119,9 @@ function update_git_repo {
}
# Update git checkouts.
if [ "X$DEPOT_TOOLS_UPDATE" != "X0" ]; then
if [ "X$DEPOT_TOOLS_UPDATE" = "X0" ]; then
echo "DEPOT_TOOLS_UPDATE environment variable is 0, skipping update. Set DEPOT_TOOLS_UPDATE to 1 to force update." >&2
else
if [ -e "$base_dir/.git" ]; then
cd "$base_dir"
update_git_repo

Loading…
Cancel
Save