Skip to content

Commit

Permalink
fix: omit dirs from executable searches (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
reubeno authored Oct 25, 2024
1 parent 540ed09 commit 1efdbf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion brush-core/src/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ impl Shell {
/// * `required_glob_pattern` - The glob pattern to match against.
#[allow(clippy::manual_flatten)]
pub fn find_executables_in_path(&self, required_glob_pattern: &str) -> Vec<PathBuf> {
let is_executable = |path: &Path| path.executable();
let is_executable = |path: &Path| path.is_file() && path.executable();

let mut executables = vec![];
for dir_str in self.env.get_str("PATH").unwrap_or_default().split(':') {
Expand Down

0 comments on commit 1efdbf8

Please sign in to comment.