File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -71,19 +71,18 @@ def identify_python_interpreter(python: str) -> Optional[str]:
71
71
if py :
72
72
return py
73
73
74
- # If the named file exists, and is executable, use it.
74
+ # If the named file exists, use it.
75
75
# If it's a directory, assume it's a virtual environment and
76
76
# look for the environment's Python executable.
77
77
if os .path .exists (python ):
78
- # Do the directory check first because directories can be executable
79
78
if os .path .isdir (python ):
80
79
# bin/python for Unix, Scripts/python.exe for Windows
81
80
# Try both in case of odd cases like cygwin.
82
81
for exe in ("bin/python" , "Scripts/python.exe" ):
83
82
py = os .path .join (python , exe )
84
83
if os .path .exists (py ):
85
84
return py
86
- elif os . access ( python , os . X_OK ) :
85
+ else :
87
86
return python
88
87
89
88
# Could not find the interpreter specified
You can’t perform that action at this time.
0 commit comments