Skip to content

[path][P1] PATH lookup falls back to the embedded /bin and Windows search after an assignment: 'PATH=/nonexistent; hash -r; ls' runs ls, rc 0 #588

Closed

Description

@caomengxuan666

GNU: bash -c 'PATH=/nonexistent; hash -r; ls' -> command not found, rc 127; command -v ls fails. niu: ls runs (embedded /bin), command -v ls -> /bin/ls, rc 0. The variable itself is assigned correctly — only the lookup layer falls back. Prepend/shadow (PATH=$dir:$PATH) works; the broken half is the restriction/cut-off contract. Found in the 1.4.0 semantic sweep; all modes/entries affected.

Activity

  1. added
    bug
    on Oct 13, 2026
  2. added a commit that references this issue on Oct 13, 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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions