From eb621ace5a2da3c4cd52c01393b2f6676995d697 Mon Sep 17 00:00:00 2001 From: OfficeCom Codex Date: Mon, 27 Jul 2026 01:25:26 +0200 Subject: [PATCH] Preserve updater exit code in bootstrap --- scripts/bootstrap-ocsentinel-ninja.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/bootstrap-ocsentinel-ninja.ps1 b/scripts/bootstrap-ocsentinel-ninja.ps1 index ed25e7f..cdd3160 100644 --- a/scripts/bootstrap-ocsentinel-ninja.ps1 +++ b/scripts/bootstrap-ocsentinel-ninja.ps1 @@ -62,7 +62,10 @@ exit `$LASTEXITCODE "@ & powershell.exe -NoProfile -ExecutionPolicy Bypass -Command $command - return $LASTEXITCODE + $exitCode = $LASTEXITCODE + if ($exitCode -ne 0) { + throw "OCSentinel updater exited with code $exitCode" + } } Initialize-OCSentinelTls @@ -104,10 +107,7 @@ function Assert-ArtifactSignature { if (Test-Path -LiteralPath $updaterPath) { Write-Host "Existing OCSentinel installation found. Checking for updates." - $updaterExitCode = Invoke-OCSentinelUpdater -UpdaterPath $updaterPath -ManifestUri $ManifestUrl - if ($updaterExitCode -ne 0) { - throw "OCSentinel updater exited with code $updaterExitCode" - } + Invoke-OCSentinelUpdater -UpdaterPath $updaterPath -ManifestUri $ManifestUrl } else { Write-Host "Reading OCSentinel release manifest: $ManifestUrl"