also consider local version

This commit is contained in:
j 2024-08-30 13:07:20 +02:00
parent 171059cf45
commit 29a309f15e

View file

@ -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):