mirror of https://github.com/sbt/sbt.git
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:
parent
d5be7069e2
commit
af97d53ec7
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue