Repository navigation
fix: preserve bare defaultInterpreterPath commands - #1927
Conversation
|
For separator-free values, could we use this precedence?
This would preserve workspace-relative environment folders such as |
There was a problem hiding this comment.
🟡 Changes recommended
Native lookup can succeed while background execution still fails with ENOENT because the fallback retains a bare command name instead of the resolved environment’s executable and path.
1 open issue
What changed in this PR
Addresses #1917 by preserving bare python.defaultInterpreterPath commands for native resolution when they are absent from the extension-host PATH.
Changes:
- Pass missing bare commands through unchanged instead of resolving them against the workspace.
- Preserve workspace-relative resolution for existing bare directory names such as
.venv. - Update regression tests for both behaviors.
| File | Description |
|---|---|
src/test/features/interpreterSelection.unit.test.ts |
Tests unchanged command forwarding and bare workspace-directory resolution. |
src/features/interpreterSelection.ts |
Distinguishes unresolved bare commands from existing workspace directories. |
Review effort: Balanced
Eduardo Villalpando Mello (edvilme)
left a comment
There was a problem hiding this comment.
Changes look good overall, except for a few comments and questions. Thank you very much for working on this!
|
Hello, thanks for your quick response and for taking a look at all the comments. Changes look good to me. Thank you! |
0f7bcaf
into
microsoft:main

Fixes #1917
Fix workspace-scoped python.defaultInterpreterPath values that use a bare command name, such as python3.12. When the command is unavailable on the extension-host PATH, keep it unchanged for native resolution instead of converting it to a workspace-relative path.