Skip to content

Commit

Permalink
fix: fallback to "python" binary on Windows (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl authored Oct 28, 2024
1 parent 3f8313e commit d5d5e18
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion st4_py38/lsp_utils/pip_client_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ def get_python_binary(cls) -> str:
When only the binary name is specified then it will be expected that it can be found on the PATH.
"""
return 'py' if sublime.platform() == 'windows' else 'python3'
if sublime.platform() == 'windows':
if shutil.which('py'):
return 'py'
return 'python'
return 'python3'

# --- GenericClientHandler handlers -------------------------------------------------------------------------------

Expand Down

0 comments on commit d5d5e18

Please sign in to comment.