Fixed issue where TMP environment variable lead to death.

This commit is contained in:
Josh Suereth 2012-10-25 12:12:28 -04:00
parent 37f9d6bf21
commit db3413e9c1
1 changed files with 3 additions and 4 deletions

View File

@ -9,7 +9,7 @@
@REM ZOMG! We need delayed expansion to build up CFG_OPTS later
@setlocal enabledelayedexpansion
@echo on
@echo off
set SBT_HOME=%~dp0
set ERROR_CODE=0
@ -17,10 +17,10 @@ rem FIRST we load the config file of extra options.
set FN=%SBT_HOME%sbtconfig.txt
set CFG_OPTS=
FOR /F "tokens=* eol=# usebackq delims=" %%i IN ("%FN%") DO (
set TMP=%%i
set DO_NOT_REUSE_ME=%%i
rem ZOMG (Part #2) WE use !! here to delay the expansion of
rem CFG_OPTS, otherwise it remains "" for this loop.
set CFG_OPTS=!CFG_OPTS! !TMP!
set CFG_OPTS=!CFG_OPTS! !DO_NOT_REUSE_ME!
)
rem We use the value of the JAVACMD environment variable if defined
@ -40,7 +40,6 @@ if "%_JAVA_OPTS%"=="" set _JAVA_OPTS=%CFG_OPTS%
:run
echo "%_JAVACMD%" %_JAVA_OPTS% %SBT_OPTS% -cp "%SBT_HOME%jansi.jar;%SBT_HOME%sbt-launch.jar;%SBT_HOME%classes" SbtJansiLaunch %*
"%_JAVACMD%" %_JAVA_OPTS% %SBT_OPTS% -cp "%SBT_HOME%jansi.jar;%SBT_HOME%sbt-launch.jar;%SBT_HOME%classes" SbtJansiLaunch %*
if ERRORLEVEL 1 goto error
goto end