-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build,win: fix python detection script to handle spaces in path #14552
Conversation
Can you think of a good point for it to make noise? That is |
Well, there is already this code in call tools\msvs\find_python.cmd
if errorlevel 1 echo Could not find python2 & goto :exit And then I would have expected that to be triggered by the second line here in %p%python.exe -V 2>&1 | findstr /R "^Python.2.*" > NUL
IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL% However, when there is a space in the path, the script just dies at the findstr call there. I don't understand it, and I can't figure out any way to actually detect that error. |
Well... |
Landed in cee8d6d |
vcbuild.bat
silently failed for me. I found the problem was the newfind_python.cmd
script failed to invokepython.exe
because mine was installed at "C:\Program Files\Python27". Adding quotes in a few places fixed it.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
build, win