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

Unified Diff: update_depot_tools

Issue 1847433002: Add warning when running gclient under MSYS shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Make comment better Created 4 years, 9 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 0177877d47907ac89e771c6225ffa09f27d28ff4..9d9d656539b34b91e892725c4651485d3523931f 100755
--- a/update_depot_tools
+++ b/update_depot_tools
@@ -11,7 +11,21 @@ then
exit
fi
-# Test if this script is running under a MSys install. If it is, we will
+# Test if this script is running under a MSYS install. This is likely an error
+# if it is, so we warn the user accordingly.
+OUTPUT="$(uname | grep 'MSYS')"
+MSYS=$?
+if [ $MSYS = 0 ]; then
+ echo 'WARNING: It looks like you are running these tools from an MSYS shell'
+ echo '(as opposed to a MinGW shell). This shell is not supported and may'
+ echo 'fail in mysterious ways.'
+ echo
+ echo 'To run the supported MinGW shell, use `git bash`, or use `bin/bash.exe`'
+ echo 'in your MinGW installation, as opposed to `usr/bin/bash.exe`.'
+ echo
+fi
+
+# Test if this script is running under a MinGW install. If it is, we will
# hardcode the paths to SVN and Git where possible.
OUTPUT="$(uname | grep 'MINGW')"
MINGW=$?
@@ -25,10 +39,8 @@ else
fi
fi
-# Don't try to use Cygwin tools. Get real win32 tools using the batch script.
-OUTPUT="$(uname | grep 'CYGWIN')"
-CYGWIN=$?
-if [ $CYGWIN = 0 ] || [ $MINGW = 0 ]; then
+# We want to update the bundled tools even under MinGW.
+if [ $MINGW = 0 ]; then
$COMSPEC /c `cygpath -w "$base_dir/bootstrap/win/win_tools.bat"`
fi
« 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