Absolute paths

This commit is contained in:
Raoul Snyman 2016-12-05 23:39:17 +02:00
parent 5ce4f143fa
commit 6e6f6ddf2d
1 changed files with 2 additions and 2 deletions

View File

@ -46,8 +46,8 @@ def _which(program):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
fpath, fname = os.path.split(program)
if fpath and is_exe(program):
return program
if fpath and is_exe(os.path.abspath(program)):
return os.path.abspath(program)
else:
for path in os.environ['PATH'].split(os.pathsep):
path = path.strip('"')