From 04b1f2a6676cf80623f1e31d721cd69186c021c3 Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Thu, 18 Apr 2024 23:52:50 +0200 Subject: [PATCH] Do not let directories detect as executables As per apposed/appose-java@2c616f7bcf8625f9f50e510a74c7c4e043983df3. --- src/appose/paths.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appose/paths.py b/src/appose/paths.py index 734c58f..7e33995 100644 --- a/src/appose/paths.py +++ b/src/appose/paths.py @@ -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