fix: remove .UI.RawUI.KeyAvailable which crashes in pipe mode
This commit is contained in:
+1
-1
@@ -901,7 +901,7 @@ function Resolve-InstallSource {
|
|||||||
function Resolve-RemoteVersion {
|
function Resolve-RemoteVersion {
|
||||||
while (-not $script:REMOTE_VERSION) {
|
while (-not $script:REMOTE_VERSION) {
|
||||||
Write-Warn "无法从 $($script:SELECTED_SOURCE) 获取远程版本"
|
Write-Warn "无法从 $($script:SELECTED_SOURCE) 获取远程版本"
|
||||||
if (-not $host.UI.RawUI.KeyAvailable -and -not $isIexExecution) {
|
if (-not $isIexExecution) {
|
||||||
# 交互式
|
# 交互式
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
Write-Host "请选择操作:" -ForegroundColor Yellow
|
Write-Host "请选择操作:" -ForegroundColor Yellow
|
||||||
|
|||||||
Reference in New Issue
Block a user