Skip to content

Commit

Permalink
Relay exit code
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 ff347b8 commit 2e1a4d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ function runCommand {
)

Write-Host $command
Invoke-Expression $command
$command += ';$LASTEXITCODE'
$result = Invoke-Expression $command
if ($result -ne 0) {
Write-Host "Command failed (exit: $result)"
Exit $result
}
}

function cleanProject {
Expand Down

0 comments on commit 2e1a4d9

Please sign in to comment.