Fixing exit code handling

The endlocal statement will wipe out the ERROR_CODE variable, so we cannot access %ERROR_CODE% after endlocal.
This commit is contained in:
Jason M Ray 2014-03-06 19:18:16 -08:00
parent d5be7069e2
commit af97d53ec7
1 changed files with 4 additions and 5 deletions

View File

@ -11,7 +11,6 @@
@echo off
set SBT_HOME=%~dp0
set ERROR_CODE=0
rem FIRST we load the config file of extra options.
set FN=%SBT_HOME%\..\conf\sbtconfig.txt
@ -45,10 +44,10 @@ if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
@endlocal
exit /B 1
:end
@endlocal
exit /B %ERROR_CODE%
exit /B 0