fix: use Start-Sleep instead of Read-Host in pipe mode to avoid stdin issues

This commit is contained in:
i
2026-06-02 01:09:10 +08:00
parent 2b2a8cb70e
commit 437d41bd48
+3 -3
View File
@@ -1061,12 +1061,12 @@ Print-Status
if ($isIexExecution) {
if ($Upgrade) {
Invoke-Upgrade
Read-Host "按 Enter 退出..."
Start-Sleep 3
exit
}
if ($Force -or $Source -or $SkipHub -or $InstallDir) {
Invoke-Install
Read-Host "按 Enter 退出..."
Start-Sleep 3
exit
}
if (-not $script:STATUS_CLI_INSTALLED) {
@@ -1075,7 +1075,7 @@ if ($isIexExecution) {
Write-Warn "请使用 -Source / -Force 等参数指定操作,或直接运行 install.ps1 进入交互模式"
}
Write-Host ""
Read-Host "按 Enter 退出..."
Start-Sleep 3
exit
}