From 29a309f15e074631eafa5037b71b9459e411c5d2 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 30 Aug 2024 13:07:20 +0200 Subject: [PATCH] also consider local version --- ox/file.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ox/file.py b/ox/file.py index a983662..7d4c609 100644 --- a/ox/file.py +++ b/ox/file.py @@ -42,6 +42,9 @@ def is_exe(fpath): return os.path.isfile(fpath) and os.access(fpath, os.X_OK) def which(program): + local = os.path.expanduser('~/.ox/bin/%s' % program) + if os.path.exists(local): + return local fpath, fname = os.path.split(program) if fpath: if is_exe(program):