Browse files

Fix conflict between Forge's %HOME% and Git's %HOME% environment

variable (if defined)

Change-Id: I20056d5df321fc96bd2cdce8cd8ea8b93d4e2a99
  • Loading branch information...
kennardconsulting committed Mar 1, 2012
1 parent bfeb58b commit afe5421bbb1e8ebc389429ee3eb482f0d636d939
Showing with 5 additions and 5 deletions.
  1. +5 −5 dist/src/main/resources/bin/forge.bat
@@ -28,11 +28,11 @@
@echo off
-@REM set %HOME% to equivalent of $HOME
-if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+@REM set %USERHOME% to equivalent of $HOME
@REM Execute a user defined script before this one
-if exist "%HOME%\forgerc_pre.bat" call "%HOME%\forgerc_pre.bat"
+if exist "%USERHOME%\forgerc_pre.bat" call "%USERHOME%\forgerc_pre.bat"
@@ -140,7 +140,7 @@ goto runForge
@REM Start Forge
-%FORGE_JAVA_EXE% %FORGE_OPTS% "-Dforge.home=%FORGE_HOME%" -jar %JBOSS_MODULES% -modulepath "%FORGE_HOME%\modules;%HOME%\.forge\plugins" org.jboss.forge %FORGE_CMD_LINE_ARGS%
+%FORGE_JAVA_EXE% %FORGE_OPTS% "-Dforge.home=%FORGE_HOME%" -jar %JBOSS_MODULES% -modulepath "%FORGE_HOME%\modules;%USERHOME%\.forge\plugins" org.jboss.forge %FORGE_CMD_LINE_ARGS%
if ERRORLEVEL 1 goto error
goto end
@@ -164,7 +164,7 @@ goto postExec
@endlocal & set ERROR_CODE=%ERROR_CODE%
-if exist "%HOME%\forgerc_post.bat" call "%HOME%\forgerc_post.bat"
+if exist "%USERHOME%\forgerc_post.bat" call "%USERHOME%\forgerc_post.bat"
if "%FORGE_TERMINATE_CMD%" == "on" exit %ERROR_CODE%

0 comments on commit afe5421

Please sign in to comment.