Browse Source

Update logging to stop masking return code (#11231)

John Luo 6 years ago
parent
commit
65c8e1f5a0
2 changed files with 6 additions and 2 deletions
  1. 3 1
      build.cmd
  2. 3 1
      eng/scripts/cibuild.cmd

+ 3 - 1
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
+SET exit_code=%ERRORLEVEL%
+ECHO build.cmd completed
+EXIT /b %exit_code%

+ 3 - 1
eng/scripts/cibuild.cmd

@@ -1,4 +1,6 @@
 @ECHO OFF
 SET RepoRoot=%~dp0..\..
 %RepoRoot%\build.cmd -ci -all -pack -sign %*
-ECHO cibuild.cmd completed
+SET exit_code=%ERRORLEVEL%
+ECHO build.cmd completed
+EXIT /b %exit_code%