From ac761606bf5a07a814fce566bc066354e7623edf Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 29 Oct 2025 12:29:54 -0700 Subject: [PATCH] propagate failures --- scripts/Invoke-CodeGen.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/Invoke-CodeGen.ps1 b/scripts/Invoke-CodeGen.ps1 index 20f84eb12..afc4f58d5 100644 --- a/scripts/Invoke-CodeGen.ps1 +++ b/scripts/Invoke-CodeGen.ps1 @@ -32,7 +32,12 @@ function Invoke-ScriptWithLogging { $scriptString = $Script | Out-String Write-Host "--------------------------------------------------------------------------------`n> $scriptString" & $Script + $exitCode = $LASTEXITCODE Write-Host "" + + if ($exitCode -ne 0) { + throw "Command failed with exit code $exitCode" + } }