From e1eb36050ef4f6adbf8bc1a42464ef420a64dae0 Mon Sep 17 00:00:00 2001 From: TheGoddessInari Date: Mon, 25 Mar 2019 22:00:39 -0700 Subject: [PATCH] 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. --- mach.bat | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mach.bat b/mach.bat index 077bd574083..a270b583801 100644 --- a/mach.bat +++ b/mach.bat @@ -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 %* +)