Skip to content

[bug] Bare $NAME env fallback is case-insensitive on Windows (M2=x leaks into $m2; GNU variables.c is exact-case) #273

Closed

Description

@caomengxuan666

cifix lane finding: Rust std::env::var is case-insensitive on Windows, so the engine's bare-$NAME fallback (parameter_errors.rs:1287 + embedded_parameters.rs:615) treats $m2 as bound when only an M2-shaped ambient var exists — e.g. $username leaks USERNAME. $M2/${m2-…}/declare -p are already case-correct and disagree with $m2. Fixing touches the rubash#182 comsub-env-restore machinery and may shift pinned snapshot bytes — needs a dedicated lane with a full ledger. Repro: M2=x rubash -u -c 'echo $m2' → prints empty rc0; GNU: unbound error rc1.

Activity

  1. added a commit that references this issue on Sep 28, 2026
  2. caomengxuan666 commented on Sep 28, 2026

    @caomengxuan666
    MemberAuthor

    已修复并合入 master(commit 2c126128/d1e598e0,lane wt6/shell2;验证:modernish .t 166/166 rc 向量满分(原 159/164)、bats filter.bats 全平价 6/6、#273 大小写修完零快照漂移、regression 24/24)。后续边界已开单跟踪。感谢报告!

  3. added
    bug
    area:path
    platform:windows
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:pathbugplatform:windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions