Skip to content

Commit

Permalink
made which() robust to binaries in cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
landrumb committed Oct 7, 2024
1 parent 7528bfc commit 8340a98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pygrgl/clicmd/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def which(exe: str, required=False) -> Optional[str]:
except subprocess.CalledProcessError:
result = None
if result is None:
for p in sys.path:
for p in [*sys.path, os.getcwd()]:
p = os.path.join(p, exe)
if os.path.isfile(p):
result = p
Expand Down

0 comments on commit 8340a98

Please sign in to comment.