|
@@ -50,10 +50,15 @@ PATH=$PATH:$DEPOT_TOOLS
|
|
|
|
|
|
if [[ $PYTHON_DIRECT = 1 ]]; then
|
|
|
python.exe "$DEPOT_TOOLS\\$SCRIPT" "$@"
|
|
|
-else
|
|
|
- if [[ -e "$DEPOT_TOOLS/python.bat" && $OSTYPE = msys ]]; then
|
|
|
+elif [[ -e "$DEPOT_TOOLS/python.bat" && $OSTYPE = msys ]]; then
|
|
|
cmd.exe //c "$DEPOT_TOOLS\\vpython.bat" "$DEPOT_TOOLS\\$SCRIPT" "$@"
|
|
|
- else
|
|
|
- vpython "$DEPOT_TOOLS/$SCRIPT" "$@"
|
|
|
- fi
|
|
|
+elif [[ $GCLIENT_PY3 = 1 ]]; then
|
|
|
+ # Explicitly run on Python 3
|
|
|
+ vpython3 "$DEPOT_TOOLS/$SCRIPT" "$@"
|
|
|
+elif [[ $GCLIENT_PY3 = 0 ]]; then
|
|
|
+ # Explicitly run on Python 2
|
|
|
+ vpython "$DEPOT_TOOLS/$SCRIPT" "$@"
|
|
|
+else
|
|
|
+ # Run on Python 2 for now, allows default to be flipped.
|
|
|
+ vpython "$DEPOT_TOOLS/$SCRIPT" "$@"
|
|
|
fi
|