py2/py3 detection script

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

View File

@ -50,8 +50,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!