Skip to content

emrg: build-release 十九次修复 — smoke Windows 判断改 WINDIR 环境变量(rant #13) - #387

Merged
argszero merged 1 commit into
masterfrom
feature/build-release-fixes19
Aug 4, 2026
Merged

emrg: build-release 十九次修复 — smoke Windows 判断改 WINDIR 环境变量(rant #13)#387
argszero merged 1 commit into
masterfrom
feature/build-release-fixes19

Conversation

@argszero

@argszero argszero commented Aug 4, 2026

Copy link
Copy Markdown
Owner

第 19 次实跑 4 平台全失败(exit 127)——PR #386 引入回归。

根因:smoke-test.sh 的 Windows 判断 [ -n "${WINDIR:-}" ] || [ -f "$HOME/.emrg/install/bin/emrgd.cmd" ] 在 macOS/Linux 误判为 Windows——build-runtime.sh 第 70 行跨平台复制 emrgd.cmd(POSIX 也有此文件)→ 文件探测恒真 → macOS 走 cmd //c 分支 → macOS 无 cmd 命令 → exit 127(smoke 第 2 步 daemon 启动即挂)。

修复:Windows 判断只保留 ${WINDIR} 环境变量(Windows Git Bash 必有,macOS/Linux 无),去掉文件探测。2 处同步。

验证

  • bash -n OK
  • macOS 模拟(无 WINDIR 但有 emrgd.cmd 文件)→ nohup ✓
  • Windows 模拟(有 WINDIR)→ cmd ✓
  • pytest 464 passed;import checks OK

背景:rant #13 Phase 4 发布期。合并后重打 tag 第 20 次实跑,预期 4/4 全绿 → Release 发布。

第 19 次实跑 4 平台全失败(exit 127)——PR #386 引入回归:
smoke-test.sh 的 Windows 判断 `[ -n "${WINDIR:-}" ] || [ -f .../emrgd.cmd ]`
在 macOS/Linux 误判为 Windows——build-runtime.sh 第 70 行跨平台复制
emrgd.cmd(POSIX 也有此文件)→ 文件探测恒真 → macOS 走 cmd 分支 →
macOS 无 cmd 命令 → exit 127。

修复:Windows 判断只保留 ${WINDIR} 环境变量(Windows Git Bash 必有,
macOS/Linux 无),去掉文件探测。2 处同步。

验证:
- bash -n OK
- macOS 模拟(无 WINDIR 但有 emrgd.cmd 文件)→ nohup ✓
- Windows 模拟(有 WINDIR)→ cmd ✓
- pytest 464 passed;import checks 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 20260805-0088

审查内容:smoke-test.sh Windows 判断去掉文件探测(POSIX 也有 emrgd.cmd 导致误判),只保留 WINDIR 环境变量。修第 19 次 4 平台全失败回归。

验证:bash -n OK;macOS(无 WINDIR 有文件)→nohup / Windows(有 WINDIR)→cmd 模拟正确;pytest 464 passed。根因分析准确(emrgd.cmd 跨平台复制致文件探测恒真)。

@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 20260805-0089

第二次复核:diff 与上轮一致(smoke-test.sh Windows 判断去掉文件探测,只留 WINDIR)。bash -n OK;macOS/Windows 双模拟正确。无新增问题。

@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 20260805-0090

第三次复核:diff 稳定(smoke-test.sh Windows 判断只留 WINDIR)。bash -n OK;双模拟正确;pytest 464 passed。3 个不同 cycle(0088/0089/0090)连续 LGTM,满足合并条件。

@argszero
argszero merged commit 6c2147e into master Aug 4, 2026
1 check passed
@argszero
argszero deleted the feature/build-release-fixes19 branch August 5, 2026 06:18
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