Skip to content

Commit f36131d

Browse files
authored
Merge pull request winpython#1494 from stonebig/master
prevent doublequote in PATH to crash WinPython
2 parents f320c3f + 40d5430 commit f36131d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

make.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,11 +551,15 @@ def _create_initial_batch_scripts(self):
551551
set JUPYTER_CONFIG_DIR=%WINPYDIR%\\etc\\jupyter
552552
set JUPYTER_CONFIG_PATH=%WINPYDIR%\\etc\\jupyter
553553
set FINDDIR=%WINDIR%\\system32
554-
echo ";%PATH%;" | %FINDDIR%\\find.exe /C /I ";%WINPYDIR%\\;" >nul
554+
555+
rem Remove all double quotes
556+
set PATH_CLEANED=%PATH:"=%
557+
echo ";%PATH_CLEANED%;" | %FINDDIR%\\find.exe /C /I ";%WINPYDIR%\\;" >nul
555558
if %ERRORLEVEL% NEQ 0 (
556559
set "PATH={full_path_env_var}"
557560
cd .
558561
)
562+
set PATH_CLEANED=
559563
560564
rem force default pyqt5 kit for Spyder if PyQt5 module is there
561565
if exist "%WINPYDIR%\\Lib\\site-packages\\PyQt5\\__init__.py" set QT_API=pyqt5

0 commit comments

Comments
 (0)