fix(ci): avoid non-zero exit from iscc help probe
- stop calling iscc /? in Ensure Inno Setup step - resolve compiler path via Get-Command/Test-Path and finish with exit 0
This commit is contained in:
@@ -41,20 +41,24 @@ jobs:
|
||||
- name: Ensure Inno Setup 6
|
||||
shell: powershell
|
||||
run: |
|
||||
if (Get-Command iscc.exe -ErrorAction SilentlyContinue) {
|
||||
iscc.exe /? | Out-Null
|
||||
$isccPath = ""
|
||||
$inPath = Get-Command iscc.exe -ErrorAction SilentlyContinue
|
||||
if ($inPath) {
|
||||
$isccPath = $inPath.Source
|
||||
Write-Host "Inno Setup compiler found in PATH."
|
||||
} elseif (Test-Path "C:\Program Files (x86)\Inno Setup 6\ISCC.exe") {
|
||||
"C:\Program Files (x86)\Inno Setup 6" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /? | Out-Null
|
||||
$isccPath = "C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
|
||||
Write-Host "Inno Setup compiler found in Program Files (x86)."
|
||||
} elseif (Test-Path "C:\Program Files\Inno Setup 6\ISCC.exe") {
|
||||
"C:\Program Files\Inno Setup 6" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
& "C:\Program Files\Inno Setup 6\ISCC.exe" /? | Out-Null
|
||||
$isccPath = "C:\Program Files\Inno Setup 6\ISCC.exe"
|
||||
Write-Host "Inno Setup compiler found in Program Files."
|
||||
} else {
|
||||
throw "Inno Setup 6 is not installed on runner. Install Inno Setup and restart runner service."
|
||||
}
|
||||
Write-Host "Using ISCC: $isccPath"
|
||||
exit 0
|
||||
|
||||
- name: Extract app version
|
||||
id: extract_version
|
||||
|
||||
Reference in New Issue
Block a user