Wave icon indicating copy to clipboard operation
Wave copied to clipboard

Skip non-executable files when searching PATH for build tools

Open LunaStev opened this issue 3 weeks ago • 2 comments

Problem

The shared which helper accepts any regular file. An earlier non-executable file shadows a later working tool and causes build/provisioning to fail.

Reproduction and evidence

Audited canonical master 69a67c6e0fb700f37ee6114f5a66d37ee13771a5 (0.0.1-alpha-dev). Matching checkout-built compiler/std were used for compiler probes on Linux amd64 with Rust 1.89.0 and LLVM 21.1.8. Artifact inspection, mocked/projection checks and foreign-target object emission are identified below and are not native execution on those operating systems.

Executed a disposable PATH with first/audit-tool (mode 0644, non-executable) and second/audit-tool (mode 0755, valid shell script). package::which("audit-tool") returns first/audit-tool. The expected PATH candidate is second/audit-tool. No system PATH files were changed.

Scope

Apply the host executable-search rules while preserving ordered lookup, direct paths and Windows executable suffix behavior.

Starting points: tools/src/package.rs:10.

Completion criteria

  • [ ] Earlier non-executable files/directories do not hide a usable later PATH tool.
  • [ ] A genuinely missing/unusable tool yields a clear failure.
  • [ ] Add Unix permission and platform-appropriate direct-path controls.

This is a bounded newcomer task with the starting point and focused negative/positive checks above.

Related: #594. Related broad trackers or completed implementations are context, not claims that their entire scope is unfinished.

LunaStev avatar Nov 12 '26 12:11 LunaStev

Hey @LunaStev , I'd like to work on this issue. Could you please assign it to me?

tecnolgd avatar Nov 13 '26 16:11 tecnolgd

Hey @LunaStev , I'd like to work on this issue. Could you please assign it to me?

Ok

LunaStev avatar Nov 13 '26 16:11 LunaStev