From 634d38d41473517a8c90588b7a9475ae3220e6d2 Mon Sep 17 00:00:00 2001 From: SkyJourney Date: Tue, 18 Aug 2026 09:14:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=80=E9=94=AE?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E5=91=BD=E4=BB=A4=E5=9C=A8=20irm|iex=20?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E4=B8=8B=E7=9A=84=20BOM=20=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit install.ps1 为兼容 Windows PowerShell 5.1 的 -File 加载场景带有 UTF-8 BOM, 但 irm 拉取内容再交给 iex 执行时不会自动剥离 BOM 字节,导致其被解码为字符串 里的 U+FEFF 字符,紧贴首行注释符 # 被解析器当作未知命令,报错但不影响最终结果。 改为先 TrimStart([char]0xFEFF) 再 iex,兼容 PS 5.1 和 PS 7。同时把 Windows 一节标题和说明明确标注 PowerShell,避免有人用 cmd 执行。 Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01NTuSGDEryaM7BUop9wNni9 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9bf8b44..6be3628 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,12 @@ curl -fsSL https://gitea.rk-health.com/jiangshunzhi/Gemini-in-Chrome/raw/branch/main/install.sh | bash ``` -### Windows +### Windows(PowerShell) -打开 PowerShell 执行: +打开 PowerShell(不是 cmd)执行: ```powershell -irm https://gitea.rk-health.com/jiangshunzhi/Gemini-in-Chrome/raw/branch/main/install.ps1 | iex +iex ((irm https://gitea.rk-health.com/jiangshunzhi/Gemini-in-Chrome/raw/branch/main/install.ps1).TrimStart([char]0xFEFF)) ``` ## 脚本做了什么