Preserve updater exit code in bootstrap
Some checks failed
OfficeCom Sentinel Client / validate-client (push) Successful in 22s
OfficeCom Sentinel Client / build-client-windows (push) Failing after 48s

This commit is contained in:
OfficeCom Codex
2026-07-27 01:25:26 +02:00
parent e997e6b58c
commit eb621ace5a

View File

@@ -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"