diff options
author | Luigi Pinca <luigipinca@gmail.com> | 2022-04-23 22:45:27 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2022-04-28 07:57:22 +0300 |
commit | f9994e2029a71b1e9da83765112043b86c584911 (patch) | |
tree | cd21126933e7efb40297f970f312fc1116054293 /tools | |
parent | 7681e6082954a559838bfadc8b5beaf492f41aed (diff) |
build: improve reliability of find_python.cmd script
The path of the Python executable might contain white spaces. Handle
this when the `check-python` function is called.
Fixes: https://github.com/nodejs/node/issues/42801
PR-URL: https://github.com/nodejs/node/pull/42810
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/msvs/find_python.cmd | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/msvs/find_python.cmd b/tools/msvs/find_python.cmd index 06e41fe06cd..00fb6c9afbf 100644 --- a/tools/msvs/find_python.cmd +++ b/tools/msvs/find_python.cmd @@ -46,7 +46,7 @@ exit /b 1 :found-python echo Python found in %p%\python.exe -call :check-python %p%\python.exe +call :check-python "%p%\python.exe" if errorlevel 1 goto :no-python endlocal ^ & set "pt=%p%" ^ @@ -57,7 +57,7 @@ set "need_path_ext=" exit /b 0 :check-python -%~1 -V +%1 -V :: 9009 means error file not found if %errorlevel% equ 9009 ( echo Not an executable Python program |