From c61cce55749681114e1751fbce7c1a50b511184e Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Thu, 6 Jun 2019 15:35:50 -0700 Subject: [PATCH] ensure failing build/test exits early --- eng/build.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eng/build.ps1 b/eng/build.ps1 index 7351abec3..98b352ee2 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -13,6 +13,9 @@ function TestUsingNPM([string] $testPath) { try { # invoke regular build/test script . (Join-Path $PSScriptRoot "common\build.ps1") @args + if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE + } # directly invoke npm tests if (($null -ne $args) -and ($args.Contains("-test") -or $args.Contains("-t"))) {