also consider local version
This commit is contained in:
parent
171059cf45
commit
29a309f15e
1 changed files with 3 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue