mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-24 20:30:06 +00:00
lit: Util.which(): Use os.path.isfile() instead of os.path.exists(), or it hits to the directory.
For example, which('loop-convert') returns 'loop-convert' when the directory 'loop-convert' exists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163469 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cacd9d6f79
commit
46b4b112d2
@ -56,7 +56,7 @@ def which(command, paths = None):
|
||||
paths = os.environ.get('PATH','')
|
||||
|
||||
# Check for absolute match first.
|
||||
if os.path.exists(command):
|
||||
if os.path.isfile(command):
|
||||
return command
|
||||
|
||||
# Would be nice if Python had a lib function for this.
|
||||
|
Loading…
Reference in New Issue
Block a user