fix(runner): run Python venv binaries directly, not via node
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -117,11 +117,17 @@ async function initMcp(svc) {
|
|||||||
// --- Spawn ---
|
// --- Spawn ---
|
||||||
|
|
||||||
function spawnService(svc) {
|
function spawnService(svc) {
|
||||||
// npx packages have a pre-resolved binary
|
// npx/uvx packages have a pre-resolved binary
|
||||||
let cmd, args;
|
let cmd, args;
|
||||||
if (svc._npxBin) {
|
if (svc._npxBin) {
|
||||||
cmd = "node";
|
// Python venv binaries are scripts with shebangs — run directly
|
||||||
args = [svc._npxBin];
|
if (svc.runtime === "python") {
|
||||||
|
cmd = svc._npxBin;
|
||||||
|
args = [];
|
||||||
|
} else {
|
||||||
|
cmd = "node";
|
||||||
|
args = [svc._npxBin];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
({ cmd, args } = detectEntry(svc.sourcePath, svc.runtime));
|
({ cmd, args } = detectEntry(svc.sourcePath, svc.runtime));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user