Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLuigi Pinca <luigipinca@gmail.com>2022-04-23 22:45:27 +0300
committerGitHub <noreply@github.com>2022-04-23 22:45:27 +0300
commite2ff1c3b2c40874a41c0c75f2551420af78b96bf (patch)
treee02a9fabd03eb78087c637d52c06b876ad91602e /tools
parent603803ecb776ca5d9644c6b16c1c2a45b99b27fe (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.cmd4
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