forked from VimPlug/jedi
Add a windows path in _get_executable_path()
This commit is contained in:
@@ -373,10 +373,13 @@ def _get_executable_path(path, safe=True):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
python = os.path.join(path, 'Scripts', 'python.exe')
|
pythons = [os.path.join(path, 'Scripts', 'python.exe'), os.path.join(path, 'python.exe')]
|
||||||
|
else:
|
||||||
|
pythons = [os.path.join(path, 'bin', 'python')]
|
||||||
|
for python in pythons:
|
||||||
|
if os.path.exists(python):
|
||||||
|
break
|
||||||
else:
|
else:
|
||||||
python = os.path.join(path, 'bin', 'python')
|
|
||||||
if not os.path.exists(python):
|
|
||||||
raise InvalidPythonEnvironment("%s seems to be missing." % python)
|
raise InvalidPythonEnvironment("%s seems to be missing." % python)
|
||||||
|
|
||||||
_assert_safe(python, safe)
|
_assert_safe(python, safe)
|
||||||
|
|||||||
Reference in New Issue
Block a user