winux-core path.rs 的 Rust 移植修复同类问题时的发现(CI gate mk16-p-dir 行,rust2 侧修复为 skip POSIX 形式 + GetTempPathW 兜底)。 **现象**:父进程为 Git Bash 时,TEMP/TMP 以 MSYS 形式 `/tmp` 导出到子进程环境。1.x C++ 的 `tmp_base_w`(native_path.cppm:176)按 niubash#94 优先级 TMPDIR>TEMP>TMP 信任该值 → `/tmp` 解析回 `/tmp` → 循环映射 → 一切临时文件命令(mktemp 等)写向不存在的 Windows 路径。 **复现**:Git Bash 下 `TEMP=/tmp winuxcmd mktemp -p /tmp x.XXXXXX` → 失败;同命令在 cmd/PowerShell/niubash 父进程下成功。 **rust2 侧修法**(已落地 winux-core path.rs tmp_base):POSIX 形式(前导 `/`)的候选跳过,继续 TMPDIR>TEMP>TMP 优先级;全为 POSIX 形式时 GetTempPathW 兜底(其自身会跳过不存在的候选落到 USERPROFILE)。C++ 侧同法即可。 **影响面**:所有经 `/tmp` 的 1.x 命令在 Git Bash 父进程下;niubash 父进程不受影响(其 TEMP 为 Windows 形式)。
Activity
fix(native_path): resolve-then-adopt POSIX-spelled tmp_base_w candida…
fix(path): tmp_base_w skips POSIX-spelled TEMP/TMP — Git Bash circula…