From d4328f0eb725d1de124e7cc40b56e554bf5757c0 Mon Sep 17 00:00:00 2001 From: Andy Date: Sat, 31 Jan 2026 22:06:04 -0700 Subject: [PATCH] fix(binaries): search subdirectories for binary files Allow binaries to be found in subdirectories of the binaries folder. --- unshackle/core/binaries.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unshackle/core/binaries.py b/unshackle/core/binaries.py index d984c0c..598387c 100644 --- a/unshackle/core/binaries.py +++ b/unshackle/core/binaries.py @@ -17,6 +17,10 @@ def find(*names: str) -> Optional[Path]: if local_binaries_dir.exists(): candidate_paths = [local_binaries_dir / f"{name}{ext}", local_binaries_dir / name / f"{name}{ext}"] + for subdir in local_binaries_dir.iterdir(): + if subdir.is_dir(): + candidate_paths.append(subdir / f"{name}{ext}") + for path in candidate_paths: if path.is_file(): # On Unix-like systems, check if file is executable