summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2016-08-04 19:41:20 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2016-10-25 13:49:43 +0000
commite93bb481016d910201a215ba712278d9cd993565 (patch)
treefc2ba3bc9522fba7d7795bcfc141bada02da8488
parent2dc6c05976e3fccd29b620079ae3ff33d13f2ffb (diff)
Fix ERRORLEVEL propagation in helper batch files
In ibjom.bat and xgejom.bat ERRORLEVEL wasn't properly propagated to the calling script because of the setlocal/endlocal pair that's used within. Use the absurd enabledelayedexpansion trick that seems to be the canonical fix. Task-number: QTCREATORBUG-16619 Change-Id: Icae4b977309e8a55806fbd3511661366fcefe432 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--bin/ibjom.bat4
-rw-r--r--bin/xgejom.bat4
2 files changed, 4 insertions, 4 deletions
diff --git a/bin/ibjom.bat b/bin/ibjom.bat
index 297f6f7..cc8843d 100644
--- a/bin/ibjom.bat
+++ b/bin/ibjom.bat
@@ -1,5 +1,5 @@
@echo off
-setlocal
+setlocal enabledelayedexpansion
if "%IBJOM_NUMBEROFJOBS%" == "" set IBJOM_NUMBEROFJOBS=20
-BuildConsole /command="jom -j%IBJOM_NUMBEROFJOBS% %*"
+BuildConsole /command="jom -j%IBJOM_NUMBEROFJOBS% %*" || exit /b !ERRORLEVEL!
endlocal
diff --git a/bin/xgejom.bat b/bin/xgejom.bat
index 4a8f625..80a9054 100644
--- a/bin/xgejom.bat
+++ b/bin/xgejom.bat
@@ -1,6 +1,6 @@
@echo off
-setlocal
+setlocal enabledelayedexpansion
if "%IBJOM_NUMBEROFJOBS%" == "" set IBJOM_NUMBEROFJOBS=60
set NINJAFLAGS=-j60
-xgConsole /profile="%~dp0\xgejom.xml" /command="jom -j%IBJOM_NUMBEROFJOBS% %*"
+xgConsole /profile="%~dp0\xgejom.xml" /command="jom -j%IBJOM_NUMBEROFJOBS% %*" || exit /b !ERRORLEVEL!
endlocal