Private
Public Access
1
0

fix: 将 iwr|iex 替换为 iex(irm) 修复中文乱码
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 41s

iwr -useb URL | iex 管道传递 response 对象时,
ToString() 转换会丢失 Unicode 中文字符。
改用 irm (Invoke-RestMethod) 直接返回字符串内容,
避免对象到字符串的管道转换损坏。
This commit is contained in:
2026-02-28 17:00:45 +08:00
parent fb5be7563a
commit b07c61aa9d
14 changed files with 16 additions and 15 deletions

View File

@@ -6,7 +6,7 @@ param(
[switch]$Help
)
# 支持一行命令传入 API Key: $key='xxx'; iwr ... | iex
# 支持一行命令传入 API Key: $key='xxx'; iex (irm URL)
if (-not $ApiKey -and (Test-Path Variable:key)) { $ApiKey = $key }
# ========== UTF-8 编码兼容 ==========
@@ -70,7 +70,7 @@ Options:
- Node.js fnm Node.js 24.x
使:
`$key='YOUR_API_KEY'; iwr -useb https://gitea.sususu.cf/sususu/xcodecli-shells/raw/branch/main/setup.ps1 | iex
`$key='YOUR_API_KEY'; iex (irm https://gitea.sususu.cf/sususu/xcodecli-shells/raw/branch/main/setup.ps1)
"@
exit 0
}