Skip to content

Commit f1dd087

Browse files
committed
ci(windows): Skip installing Inno Setup if already installed
GitHub had removed Inno Setup from the Windows Server 2025 image, but now they've recently reintroduced it: https://redirect.github.com/actions/runner-images/issues/12947#issuecomment-3416540769 This new image with Inno Setup pre-installed is not generally available yet, so we still need to keep the "Install latest Inno Setup" CI step around, because our Windows CI runner might be randomly assigned an older version of the Windows 2025 image, where Inno Setup doesn't come pre-installed. To prevent that step from randomly failing, however, we now check if Inno Setup is already installed before invoking "winget install".
1 parent f779f4a commit f1dd087

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/windows.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,12 @@ jobs:
161161
162162
- name: Install latest Inno Setup
163163
run: |
164-
winget install --id JRSoftware.InnoSetup --exact --silent --source winget
165-
# Add to PATH
166-
Add-Content $env:GITHUB_PATH "$env:LOCALAPPDATA\Programs\Inno Setup 6"
164+
# Only installs if Inno Setup's Compiler (ISCC.exe) is not already in the PATH environment variable.
165+
if (-Not (Get-Command ISCC -ErrorAction SilentlyContinue)) {
166+
winget install --id JRSoftware.InnoSetup --exact --silent --source winget
167+
# Add to PATH
168+
Add-Content $env:GITHUB_PATH "$env:LOCALAPPDATA\Programs\Inno Setup 6"
169+
}
167170
168171
- name: Create installer
169172
run: |

0 commit comments

Comments
 (0)