mirror of https://github.com/pypa/pip
修复配置PATHEXT最后一个字符如果是分号的情况。
This commit is contained in:
parent
0c599b68e8
commit
5230dd2016
|
@ -87,7 +87,7 @@ def find_command(cmd, paths=None, pathext=None):
|
|||
# check if there are funny path extensions for executables, e.g. Windows
|
||||
if pathext is None:
|
||||
pathext = get_pathext()
|
||||
pathext = [ext for ext in pathext.lower().split(os.pathsep)]
|
||||
pathext = [ext for ext in pathext.lower().split(os.pathsep) if len(ext)]
|
||||
# don't use extensions if the command ends with one of them
|
||||
if os.path.splitext(cmd)[1].lower() in pathext:
|
||||
pathext = ['']
|
||||
|
|
Loading…
Reference in New Issue