From e93bb481016d910201a215ba712278d9cd993565 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 4 Aug 2016 19:41:20 +0200 Subject: 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 --- bin/ibjom.bat | 4 ++-- bin/xgejom.bat | 4 ++-- 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 -- cgit v1.2.3