Private
Public Access
1
0

fix: 子脚本用户取消安装时返回非零退出码,避免父脚本误报成功

子脚本取消时 exit 0 改为 exit 1,父脚本 Invoke-RemoteSetup
仅依赖 LASTEXITCODE 判断结果(| Out-Host 导致 $? 不可靠)。
This commit is contained in:
2026-03-20 23:37:15 +08:00
parent fcb8c5e45e
commit 9954678c4f
5 changed files with 7 additions and 6 deletions

View File

@@ -468,7 +468,7 @@ function Main {
if ($install -eq "n" -or $install -eq "N") {
Write-Info "已取消"
exit 0
exit 1
}
if (-not (Install-Tool)) {