Browse files

Avoid quoting environment variable values.

The HOME environment variable needs to be unquoted as when it is used
the quotes are added by the caller (eg: "%HOME%\NUL") and this can expand
to double quoted mayhem (eg: ""c:\documents and settings\user"\NUL") which
causes trouble in later scripts.

Signed-off-by: Pat Thoyts <>
  • Loading branch information...
1 parent daafc61 commit 83e164cb9accc0e88819f44c07737a72db199fe8 @patthoyts patthoyts committed Sep 13, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 git-cmd.bat
@@ -6,8 +6,8 @@
@for /F "delims=" %%I in ("%~dp0") do @set git_install_root=%%~fI
@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;%PATH%
-@if not exist "%HOME%" @set HOME="%HOMEDRIVE%%HOMEPATH%"
-@if not exist "%HOME%" @set HOME="%USERPROFILE%"
+@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
+@if not exist "%HOME%" @set HOME=%USERPROFILE%

0 comments on commit 83e164c

Please sign in to comment.