Repository navigation
Conversation
Signed-off-by: tecnolgd <tecnolgd@proton.me>
Signed-off-by: tecnolgd <tecnolgd@proton.me>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update
package::whichintools/src/package.rsto verify Unix executable permission bits (metadata.mode() & 0o111 != 0) before returning matching files for both direct paths andPATHlookups, and add a unit test covering non-executable vs. executable resolution.Motivation
Closes #1123. Previously,
package::whichonly checkedis_file(), allowing non-executable regular files (e.g.,0644stubs) earlier inPATHor passed directly to shadow valid executables (0755) later inPATH.Target and compatibility impact
On Unix targets,
package::whichnow skips non-executable regular files when resolving tools while keeping directory skipping intact. Windows executable suffix resolution (PATHEXT/.exe,.cmd,.bat) and direct-path resolution remain unchanged.Validation
cargo fmt --all --check(passed)cargo test -p wave-tools --lib package::tests::which_skips_non_executable_files_and_preserves_executable_matches(passed)cargo clippy --locked -p wave-tools --no-deps --all-targets --jobs 2 -- -D warnings(verified zero warnings on modified lines; skipped workspace-wide Clippy due to unrelatedmanual_is_multiple_ofandbyte_char_sliceslints on local Rust 1.97.0)meson test -C build-tools --suite tooling --suite policy) as Meson is not installed in the local environment; relying on CI for Meson suite validation.Checklist
Signed-off-byline.std/.