Skip to content

Commit 498baf0

Browse files
authored
Merge pull request #80 from iMattPro/fix
Fix merge
2 parents 5bb68c8 + 2db0bd2 commit 498baf0

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/tests.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ jobs:
720720
run: |
721721
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole, IIS-WebServer, IIS-CommonHttpFeatures, IIS-ManagementConsole, IIS-HttpErrors, IIS-HttpRedirect, IIS-WindowsAuthentication, IIS-StaticContent, IIS-DefaultDocument, IIS-HttpCompressionStatic, IIS-DirectoryBrowsing, IIS-WebServerManagementTools, IIS-CGI -All
722722
Set-Service wuauserv -StartupType Manual
723-
$webConfig = "${env:GITHUB_WORKSPACE}\phpBB3\phpBB\web.config"
723+
$webConfig = "${env:GITHUB_WORKSPACE}\phpBB4\phpBB\web.config"
724724
$content = Get-Content $webConfig -Raw
725725
$content = $content.Replace(
726726
"<configuration>",
@@ -733,9 +733,13 @@ jobs:
733733
$rewriteInstalled = $false
734734
try {
735735
choco install urlrewrite -y --no-progress
736-
$rewriteInstalled = $true
736+
if ($LASTEXITCODE -eq 0) {
737+
$rewriteInstalled = $true
738+
} else {
739+
Write-Warning "URL Rewrite installation failed with exit code $LASTEXITCODE; continuing without rewrite-specific IIS configuration."
740+
}
737741
} catch {
738-
Write-Warning "URL Rewrite installation failed; continuing without rewrite-specific IIS configuration."
742+
Write-Warning "URL Rewrite installation failed: $($_.Exception.Message); continuing without rewrite-specific IIS configuration."
739743
}
740744
if (-not $rewriteInstalled) {
741745
$content = $content -replace "(?s)`r?`n\s*<rewrite>.*?</rewrite>", ""

0 commit comments

Comments
 (0)