From 6e967cc667cb6cde7ebe637cad32d6f9c23a1fe4 Mon Sep 17 00:00:00 2001 From: "Jason T. Greene" Date: Thu, 14 Sep 2023 00:19:32 -0500 Subject: [PATCH] fix error handling Signed-off-by: Jason T. Greene --- build.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.ps1 b/build.ps1 index d23f029..f2dd580 100644 --- a/build.ps1 +++ b/build.ps1 @@ -6,8 +6,9 @@ function runCommand { ) Write-Host $command - $command += ';$LASTEXITCODE' - $result = Invoke-Expression $command + + Invoke-Expression $command + $result = $LASTEXITCODE if ($result -ne 0) { Write-Host "Command failed (exit: $result)" Exit $result