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

Unified Diff: python_runner.sh

Issue 1847783002: Multiple improvements to windows bash integration. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Add direct mode and unbuffered 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 | « git_map_branches.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: python_runner.sh
diff --git a/python_runner.sh b/python_runner.sh
index bf9f624dd869834c15bb842bd858e0d5880a5e9e..ee331fc94833f9c0700894487fdaac2a28e4bd30 100755
--- a/python_runner.sh
+++ b/python_runner.sh
@@ -41,10 +41,15 @@ if [[ "$DEPOT_TOOLS" = "$0" ]]; then
else
BASENAME="${0##*\\}"
fi
+
SCRIPT="${SCRIPT-${BASENAME//-/_}.py}"
-if [[ -e "$DEPOT_TOOLS/python.bat" && $OSTYPE = msys ]]; then
- cmd.exe //c "$DEPOT_TOOLS\\python.bat" "$DEPOT_TOOLS\\$SCRIPT" "$@"
+if [[ $PYTHON_DIRECT = 1 ]]; then
+ python.exe "$DEPOT_TOOLS\\$SCRIPT" "$@"
else
- exec "$DEPOT_TOOLS/$SCRIPT" "$@"
+ if [[ -e "$DEPOT_TOOLS/python.bat" && $OSTYPE = msys ]]; then
+ cmd.exe //c "$DEPOT_TOOLS\\python.bat" "$DEPOT_TOOLS\\$SCRIPT" "$@"
+ else
+ exec "$DEPOT_TOOLS/$SCRIPT" "$@"
+ fi
fi
« no previous file with comments | « git_map_branches.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698