Skip to content

Commit

Permalink
fix error handling
Browse files Browse the repository at this point in the history
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
  • Loading branch information
n1hility committed Sep 14, 2023
1 parent 2e1a4d9 commit 6e967cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6e967cc

Please sign in to comment.