mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
build,win: fix python detection script
Handle spaces in the path to python.exe, in case it is installed under some directory like "C:\Program Files". PR-URL: https://github.com/nodejs/node/pull/14546 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
ff1a51920e
commit
cee8d6d65e
2 files changed
+3
-3
No files matched your search
@@ -41,7 +41,7 @@ EXIT /B 1
|
||||
:validate
|
||||
IF NOT EXIST "%p%python.exe" EXIT /B 1
|
||||
:: Check if %p% is python2
|
||||
%p%python.exe -V 2>&1 | findstr /R "^Python.2.*" > NUL
|
||||
"%p%python.exe" -V 2>&1 | findstr /R "^Python.2.*" > NUL
|
||||
IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
|
||||
:: We can wrap it up
|
||||
ENDLOCAL & SET pt=%p%& SET need_path_ext=%need_path%
|
||||
|
||||
Reference in new issue
Block a user