Skip to content

fix(windows): normalize prefix TMPDIR at native child boundary - #446

Merged
arookieofc merged 1 commit into
unixwin:masterfrom
Uarz:fix/native-tmpdir
Oct 8, 2026
Merged

arookieofc merged 1 commit into
unixwin:masterfrom
Uarz:fix/native-tmpdir

Conversation

@Uarz

@Uarz Uarz commented Oct 8, 2026

Copy link
Copy Markdown
Member

命令前的 TMPDIR=/c/... command 会覆盖 apply_child_environment 已完成的路径转换,导致原生 Windows 子进程仍收到 /c/...。本 PR 在这一步复用现有 child_env_value,使结果为 C:/...。

Fixes #445.

这是 unixwin/niubash#162 / 6d74c86 的补充修复,保留现有 shell-only TMPDIR 默认值策略及 shell 内路径表示;其他变量不变。

验证(Windows x64,基于 master 8d8c66a):

  • 新增直接启动与管道回归:修复前失败,修复后通过。
  • cargo test --test native_tmpdir_prefix --test issue162_tmpdir_child_boundary:8 项测试通过。
  • cargo fmt --check、git diff --check。

@caomengxuan666 请审阅这个原生子进程边界遗漏。

@arookieofc
arookieofc merged commit 29baac9 into unixwin:master Oct 8, 2026
6 checks passed
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.

[bug] Windows prefix TMPDIR assignment bypasses native child path conversion

2 participants