Merge pull request #940 from janschulz/init.bat

Add quotes around all variables
This commit is contained in:
Benjamin Staneck 2016-05-06 00:35:02 +02:00
commit 05fb4368cc

12
vendor/init.bat vendored
View File

@ -12,7 +12,7 @@ if not defined CMDER_ROOT (
) )
:: Remove trailing '\' :: Remove trailing '\'
if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1% if "%CMDER_ROOT:~-1%" == "\" SET "CMDER_ROOT=%CMDER_ROOT:~0,-1%"
:: Change the prompt style :: Change the prompt style
:: Mmm tasty lamb :: Mmm tasty lamb
@ -27,8 +27,8 @@ if "%PROCESSOR_ARCHITECTURE%"=="x86" (
:: Tell the user about the clink config files... :: Tell the user about the clink config files...
if not exist "%CMDER_ROOT%\config\settings" ( if not exist "%CMDER_ROOT%\config\settings" (
echo Generating clink initial settings in %CMDER_ROOT%\config\settings echo Generating clink initial settings in "%CMDER_ROOT%\config\settings"
echo Additional *.lua files in %CMDER_ROOT%\config are loaded on startup. echo Additional *.lua files in "%CMDER_ROOT%\config" are loaded on startup.
) )
:: Run clink :: Run clink
@ -100,7 +100,7 @@ if not exist "%CMDER_ROOT%\config\profile.d" (
pushd "%CMDER_ROOT%\config\profile.d" pushd "%CMDER_ROOT%\config\profile.d"
for /f "usebackq" %%x in ( `dir /b *.bat *.cmd 2^>nul` ) do ( for /f "usebackq" %%x in ( `dir /b *.bat *.cmd 2^>nul` ) do (
REM echo Calling %CMDER_ROOT%\config\profile.d\%%x... REM echo Calling "%CMDER_ROOT%\config\profile.d\%%x"...
call "%CMDER_ROOT%\config\profile.d\%%x" call "%CMDER_ROOT%\config\profile.d\%%x"
) )
popd popd
@ -157,8 +157,8 @@ if exist "%CMDER_ROOT%\config\user-profile.cmd" (
echo :: use this file to run your own startup commands echo :: use this file to run your own startup commands
echo :: use in front of the command to prevent printing the command echo :: use in front of the command to prevent printing the command
echo. echo.
echo :: call "%%GIT_INSTALL_ROOT%%/cmd/start-ssh-agent.cmd echo :: call "%%GIT_INSTALL_ROOT%%/cmd/start-ssh-agent.cmd"
echo :: set PATH=%%CMDER_ROOT%%\vendor\whatever;%%PATH%% echo :: set "PATH=%%CMDER_ROOT%%\vendor\whatever;%%PATH%%"
echo. echo.
) > "%CMDER_ROOT%\config\user-profile.cmd" ) > "%CMDER_ROOT%\config\user-profile.cmd"
) )