diff options
-rw-r--r-- | utils/lit/lit/Util.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/lit/lit/Util.py b/utils/lit/lit/Util.py index ad4adf2..5635f50 100644 --- a/utils/lit/lit/Util.py +++ b/utils/lit/lit/Util.py @@ -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): |