Default mach.bat to using py -2.

Servo already assumes the user has Python, this is the primary
way to make sure that Python 2 is preferred, and you should
get a sensible error message if you have python 3 but not 2.

But first, check that py.exe exists because if a system has only
Python 2.x only, it won't have it. If it doesn't, then try python.exe.
This commit is contained in:
TheGoddessInari 2019-03-25 22:00:39 -07:00 committed by Josh Matthews
parent 44162ceafb
commit e1eb36050e

View file

@ -36,4 +36,9 @@ IF EXIST "%VS_VCVARS%" (
popd
python mach %*
where /Q py.exe
IF %ERRORLEVEL% NEQ 0 (
python mach %*
) ELSE (
py -2 mach %*
)