Commit 5890f53
fix: skip remote URIs when resolving MCP server cwd
When the extension runs in the Local Extension Host on Windows while
connected to a remote workspace (SSH, Dev Container, etc.),
getWorkspaceDirs() returns vscode-remote:// URIs. These cannot be used
as a cwd for child_process.spawn(), causing "spawn cmd.exe ENOENT"
when starting MCP stdio servers.
Return undefined for non-file:// URIs so the spawn uses its default
cwd instead.
Fixes #10842
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 9b88c27 commit 5890f53
2 files changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
479 | 486 | | |
480 | 487 | | |
481 | 488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
178 | 188 | | |
179 | 189 | | |
180 | 190 | | |
| |||
0 commit comments