fix: remove .UI.RawUI.KeyAvailable which crashes in pipe mode

This commit is contained in:
i
2026-06-02 01:04:49 +08:00
parent 329f7722b3
commit ff5b372bf5
+1 -1
View File
@@ -901,7 +901,7 @@ function Resolve-InstallSource {
function Resolve-RemoteVersion {
while (-not $script:REMOTE_VERSION) {
Write-Warn "无法从 $($script:SELECTED_SOURCE) 获取远程版本"
if (-not $host.UI.RawUI.KeyAvailable -and -not $isIexExecution) {
if (-not $isIexExecution) {
# 交互式
Write-Host ""
Write-Host "请选择操作:" -ForegroundColor Yellow