fix(ci): ISCC 调用关闭 MSYS 参数路径转换,修复 more than one script filename
Git Bash(MSYS) 把 /D 开头的参数当 POSIX 路径自动转换,导致 ISCC 的 /DAppVer /DSrcDir /DOutDir 丢失 /D 前缀、被当成多个脚本文件名而报错。 调用 ISCC 时设 MSYS_NO_PATHCONV=1 + MSYS2_ARG_CONV_EXCL='*' 关闭转换。 install-innosetup.ps1 顺带加 /LOG 失败时打印安装日志。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -23,9 +23,14 @@ Write-Output "Downloaded $size bytes"
|
||||
if ($size -lt 1000000) { throw "Downloaded file too small ($size bytes) - not a valid installer" }
|
||||
|
||||
Write-Output "Installing silently..."
|
||||
$p = Start-Process -FilePath $out -ArgumentList '/VERYSILENT','/SUPPRESSMSGBOXES','/NORESTART','/SP-','/NOICONS' -Wait -PassThru
|
||||
$log = Join-Path $env:TEMP 'innosetup-install.log'
|
||||
$p = Start-Process -FilePath $out -ArgumentList '/VERYSILENT','/SUPPRESSMSGBOXES','/NORESTART','/SP-','/NOICONS',"/LOG=$log" -Wait -PassThru
|
||||
Write-Output "Installer exit code: $($p.ExitCode)"
|
||||
if ($p.ExitCode -ne 0) { throw "Inno Setup installer failed with exit code $($p.ExitCode)" }
|
||||
if ($p.ExitCode -ne 0) {
|
||||
Write-Output "----- install log tail -----"
|
||||
if (Test-Path $log) { Get-Content $log -Tail 40 | ForEach-Object { Write-Output $_ } }
|
||||
throw "Inno Setup installer failed with exit code $($p.ExitCode)"
|
||||
}
|
||||
|
||||
foreach ($c in $candidates) {
|
||||
if (Test-Path $c) { Write-Output "ISCC installed: $c"; exit 0 }
|
||||
|
||||
Reference in New Issue
Block a user