Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

More variable quoting in init.bat #941

Merged
merged 1 commit into from
May 6, 2016

Conversation

jankatins
Copy link
Contributor

There were problems when a path contained a parenthesis like C:\temp\test (test)\

As a precaution, quote all variables when they are used in echo or set.

There were problems when a path contained a parenthesis like `C:\temp\test (test)\`

As a precaution, quote all variables when they are used in echo or set.
@Stanzilla Stanzilla merged commit d4339ae into cmderdev:development May 6, 2016
@@ -8,7 +8,7 @@

:: Find root dir
if not defined CMDER_ROOT (
for /f "delims=" %%i in ("%ConEmuDir%\..\..") do set CMDER_ROOT=%%~fi
for /f "delims=" %%i in ("%ConEmuDir%\..\..") do set "CMDER_ROOT=%%~fi"
Copy link

@BrainCrumbz BrainCrumbz May 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure you want to wrap the whole assignment within double quotes? The left side of assignment is basically declaring the variable/identifier, and should not need quotes. The right side instead is what might be affected by double quotes. Just to be sure, have you checked if it works jut with ..... do set CMDER_ROOT="%%~fi" ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants