mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-05 13:16:32 +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:
@@ -64,7 +64,11 @@ def which(command, paths = None):
|
|||||||
paths = os.defpath
|
paths = os.defpath
|
||||||
|
|
||||||
# Get suffixes to search.
|
# 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...
|
# Search the paths...
|
||||||
for path in paths.split(os.pathsep):
|
for path in paths.split(os.pathsep):
|
||||||
|
|||||||
Reference in New Issue
Block a user