mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 20:59:51 +00:00
lit/Util.py: On Cygwin, 'PATHEXT' may exist but it should not be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125272 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6cdf2ea98e
commit
f5201bcd3b
@ -64,7 +64,11 @@ def which(command, paths = None):
|
||||
paths = os.defpath
|
||||
|
||||
# Get suffixes to search.
|
||||
pathext = os.environ.get('PATHEXT', '').split(os.pathsep)
|
||||
# On Cygwin, 'PATHEXT' may exist but it should not be used.
|
||||
if os.pathsep == ';':
|
||||
pathext = os.environ.get('PATHEXT', '').split(';')
|
||||
else:
|
||||
pathext = ['']
|
||||
|
||||
# Search the paths...
|
||||
for path in paths.split(os.pathsep):
|
||||
|
Loading…
Reference in New Issue
Block a user