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]:
7171 if py :
7272 return py
7373
74- # If the named file exists, and is executable, use it.
74+ # If the named file exists, use it.
7575 # If it's a directory, assume it's a virtual environment and
7676 # look for the environment's Python executable.
7777 if os .path .exists (python ):
78- # Do the directory check first because directories can be executable
7978 if os .path .isdir (python ):
8079 # bin/python for Unix, Scripts/python.exe for Windows
8180 # Try both in case of odd cases like cygwin.
8281 for exe in ("bin/python" , "Scripts/python.exe" ):
8382 py = os .path .join (python , exe )
8483 if os .path .exists (py ):
8584 return py
86- elif os . access ( python , os . X_OK ) :
85+ else :
8786 return python
8887
8988 # Could not find the interpreter specified
You can’t perform that action at this time.
0 commit comments