diff --git a/build.cmd b/build.cmd index a937720927..b14907452a 100644 --- a/build.cmd +++ b/build.cmd @@ -1,4 +1,6 @@ @ECHO OFF SETLOCAL PowerShell -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; try { & '%~dp0build.ps1' %*; exit $LASTEXITCODE } catch { write-host $_; exit 1 }" -ECHO build.cmd completed \ No newline at end of file +SET exit_code=%ERRORLEVEL% +ECHO build.cmd completed +EXIT /b %exit_code% diff --git a/eng/scripts/cibuild.cmd b/eng/scripts/cibuild.cmd index 45a4ddb9ed..de8de80014 100644 --- a/eng/scripts/cibuild.cmd +++ b/eng/scripts/cibuild.cmd @@ -1,4 +1,6 @@ @ECHO OFF SET RepoRoot=%~dp0..\.. %RepoRoot%\build.cmd -ci -all -pack -sign %* -ECHO cibuild.cmd completed \ No newline at end of file +SET exit_code=%ERRORLEVEL% +ECHO build.cmd completed +EXIT /b %exit_code%