Skip to content

emrg: 修复 windows 构建失败 — CSC_LINK 空字符串 env 触发 electron-builder 路径解析 bug(#441 回归) - #451

Closed
argszero wants to merge 1 commit into
masterfrom
fix/windows-csc-link-empty
Closed

emrg: 修复 windows 构建失败 — CSC_LINK 空字符串 env 触发 electron-builder 路径解析 bug(#441 回归)#451
argszero wants to merge 1 commit into
masterfrom
fix/windows-csc-link-empty

Conversation

@argszero

@argszero argszero commented Aug 6, 2026

Copy link
Copy Markdown
Owner

问题

v0.2.7 build-release(run 31067519195)windows-x64 job 失败:
⨯ Env WIN_CSC_LINK is not correct, cannot resolve: D:\a\emrg\emrg\emrg\gui not a file

v0.2.6(bee1211,无签名代码)windows 构建成功 → 确认是 #441 引入的回归。

根因

#441 给 Build GUI 步骤加 CSC_LINK/CSC_KEY_PASSWORD env,非 macOS 上表达式求值为空字符串。electron-builder 将空字符串 CSC_LINK 视为已设置并解析为相对路径(working-directory emrg/gui)→ 失败。

修复

移除 step env,改为 run 脚本内条件 export(仅 macOS + Secret 存在时设置):

#450(macOS keychain partition -s 修复)互补,两者合起来修复 v0.2.7 三平台构建。

验证

  • actionlint 全绿(exit 0)
  • pytest 473 passed;import check + emrg --help OK

…#441 回归)

v0.2.7 build-release(run 31067519195)windows-x64 job 失败:
  ⨯ Env WIN_CSC_LINK is not correct, cannot resolve: D:\a\emrg\emrg\emrg\gui not a file

根因:#441 给 Build GUI 步骤加 CSC_LINK/CSC_KEY_PASSWORD env,非 macOS
上表达式求值为空字符串。electron-builder 将空字符串 CSC_LINK 视为
已设置并解析为相对路径(working-directory)→ 失败。

修复:移除 step env,改为 run 脚本内条件 export(仅 macOS + Secret
存在时设置)。Windows/Linux 完全不设置 → electron-builder 走不签名
分支(保持 #441 之前行为)。macOS 签名降级逻辑不变。

验证:actionlint 全绿(exit 0);pytest 473 passed;import + --help OK。

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 86(本实例)。CSC_LINK 空字符串 env 是 electron-builder 已知陷阱(空值被当已设置 → 解析相对路径失败);run 内条件 export 是正确修复(Windows/Linux 完全不设置,macOS 降级逻辑不变)。v0.2.6 成功 vs v0.2.7 失败对比确认 #441 回归。actionlint 全绿 + pytest 473 passed。

@argszero

argszero commented Aug 6, 2026

Copy link
Copy Markdown
Owner Author

关闭:与 #452 完全重复(同一根因同一修复方案)。且 #451 基线在 #450 合并前——其 diff 会还原 #450 的 set-key-partition-list -s 修复(回归 macOS 签名),还包含删除 Agent.md actionlint 行(#449 刚加的)的无关改动。#452 基于最新 master 只改 Build GUI step,保留全部已有修复,为唯一正确修复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant