Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1590)

Unified Diff: update_depot_tools

Issue 25110004: Don't update git url if 'read' times out (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: update_depot_tools
diff --git a/update_depot_tools b/update_depot_tools
index 129ab40cb315cb0d24851b74d227b8d28cd5f0a7..a146724ff163e94340ba3d4910956a28c4f29a24 100755
--- a/update_depot_tools
+++ b/update_depot_tools
@@ -79,8 +79,9 @@ function update_git_repo {
echo " $remote_url"
echo
read -t 60 -p "OK to update it to $CANONICAL_GIT_URL ? [Y/n] " -n 1
+ STATUS=$?
echo
- if [ $? -ne "0" ]; then
+ if [[ $STATUS -ne 0 ]]; then
echo "Timeout; not updating remote URL."
elif [ -z "$REPLY" -o "$REPLY" = "Y" -o "$REPLY" = "y" ]; then
"$GIT" config remote.origin.url "$CANONICAL_GIT_URL"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698