Skip to content

Commit ac76160

Browse files
committed
propagate failures
1 parent bbe860b commit ac76160

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)