From 114e184ded1b91c9156bd2c2b83e97308eddb377 Mon Sep 17 00:00:00 2001 From: CorpNewt Date: Wed, 15 May 2019 15:47:49 -0500 Subject: [PATCH] py2/py3 detection fix --- gibMacOS.bat | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gibMacOS.bat b/gibMacOS.bat index d721c77..07f7b53 100644 --- a/gibMacOS.bat +++ b/gibMacOS.bat @@ -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!