From c1b0eaaadb68f184d2cb924f2848f1cc16f4c37a Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Mon, 19 Oct 2026 08:21:20 -0700 Subject: [PATCH] Fix Chocolatey issues once again --- .github/workflows/tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 22e4750..5d2c75a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -701,9 +701,13 @@ jobs: $rewriteInstalled = $false try { choco install urlrewrite -y --no-progress + # Native command failures do not necessarily throw in PowerShell. + if ($LASTEXITCODE -ne 0) { + throw "Chocolatey URL Rewrite installation exited with code $LASTEXITCODE." + } $rewriteInstalled = $true } catch { - Write-Warning "URL Rewrite installation failed; continuing without rewrite-specific IIS configuration." + Write-Warning "URL Rewrite installation failed; continuing without rewrite-specific IIS configuration. $_" } if (-not $rewriteInstalled) { $rewrite = $webConfigXml.SelectSingleNode('/configuration/system.webServer/rewrite')