Skip to content
This repository was archived by the owner on Sep 2, 2026. It is now read-only.

fix: 兼容 Windows PowerShell 脚本编码 - #81

Merged
HyxiaoGe merged 1 commit into
masterfrom
fix/issue-78-powershell-encoding
Aug 31, 2026
Merged

HyxiaoGe merged 1 commit into
masterfrom
fix/issue-78-powershell-encoding

Conversation

@HyxiaoGe

Copy link
Copy Markdown
Owner

背景

master 发布 run 33366368250 在 Windows PowerShell 5.1 解析 GitHub Actions 生成的 UTF-8 无 BOM 临时脚本时损坏中文字符串,导致 Verify Docker access 在执行 Docker 命令前报 The string is missing the terminator。关联 #78。

改动

  • Docker 检查的两条提示改为纯 ASCII,避免 PowerShell 5.1 误解码
  • 为含非 ASCII 内容的 windows-cleanup.ps1 增加 UTF-8 BOM
  • 新增编码契约:内联 Docker 检查必须为 ASCII;含非 ASCII 的 Windows PowerShell 文件必须带 UTF-8 BOM

验证

  • 编码契约测试修复前按预期失败两项,修复后通过
  • 关联配置测试:85 passed,15 subtests passed
  • Ruff:通过
  • git diff --check:通过
  • 去除 BOM 后的清理脚本 SHA-256 与修改前完全一致

发布约束

这是带修复提交的新流水线,不重跑失败 run。若 Windows Runner、PowerShell 或 Docker 再出现异常,立即停止,不循环重试或切换临时发布路径。

背景:master 发布在 Windows PowerShell 5.1 解析无 BOM UTF-8 临时脚本时损坏中文字符串,Docker 检查尚未执行即失败。

改动:Docker 检查提示改为纯 ASCII;含非 ASCII 的清理脚本增加 UTF-8 BOM;新增编码契约防止同类回归。

验证:关联配置测试 85 项及 15 个子测试通过;ruff、git diff --check 与 BOM 内容哈希校验通过。

Co-Authored-By: Codex <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@HyxiaoGe
HyxiaoGe merged commit 43cee73 into master Aug 31, 2026
1 check passed
@HyxiaoGe
HyxiaoGe deleted the fix/issue-78-powershell-encoding branch August 31, 2026 07:24
@HyxiaoGe
HyxiaoGe restored the fix/issue-78-powershell-encoding branch August 31, 2026 07:24
@HyxiaoGe
HyxiaoGe deleted the fix/issue-78-powershell-encoding branch August 31, 2026 07:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant