From af97d53ec7b4cb92c85ca35b4d54b1698258baf2 Mon Sep 17 00:00:00 2001 From: Jason M Ray Date: Thu, 6 Mar 2014 19:18:16 -0800 Subject: [PATCH] Fixing exit code handling The endlocal statement will wipe out the ERROR_CODE variable, so we cannot access %ERROR_CODE% after endlocal. --- src/universal/bin/sbt.bat | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/universal/bin/sbt.bat b/src/universal/bin/sbt.bat index 2ffeb3774..0b707814b 100644 --- a/src/universal/bin/sbt.bat +++ b/src/universal/bin/sbt.bat @@ -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