py2/py3 detection fix

This commit is contained in:
CorpNewt 2019-05-15 15:47:49 -05:00 committed by GitHub
parent ce15707da6
commit 114e184ded
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,8 +24,12 @@ goto checkpy
:checkpy
REM Get python location
FOR /F "tokens=* USEBACKQ" %%F IN (`python -V 2^> nul`) DO (
SET "python=%%F"
set "python="
FOR /F "tokens=* USEBACKQ" %%F IN (`python -V 2^>^&1`) DO (
set "t=%%F"
if /i "!t:~0,6!" == "python" (
set "python=%%F"
)
)
REM Check for py and give helpful hints!