Skip to content

Commit 76356c8

Browse files
propagate failures (#788)
1 parent 698a2a7 commit 76356c8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/Invoke-CodeGen.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ function Invoke-ScriptWithLogging {
3232
$scriptString = $Script | Out-String
3333
Write-Host "--------------------------------------------------------------------------------`n> $scriptString"
3434
& $Script
35+
$exitCode = $LASTEXITCODE
3536
Write-Host ""
37+
38+
if ($exitCode -ne 0) {
39+
throw "Command failed with exit code $exitCode"
40+
}
3641
}
3742

3843

0 commit comments

Comments
 (0)