Skip to content

Commit

Permalink
Do not let directories detect as executables
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrueden committed Apr 18, 2024
1 parent 641c1e5 commit 04b1f2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/appose/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ def find_exe(dirs: Sequence[str], exes: Sequence[str]) -> Optional[Path]:
# Candidate is a relative path; check beneath each given directory.
for d in dirs:
f = Path(d) / exe
if can_execute(f):
if can_execute(f) and not f.is_dir():
return f
return None

0 comments on commit 04b1f2a

Please sign in to comment.