diff --git a/package.json b/package.json index f2764bc..f225a86 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "scope": "resource" }, "vitest.nodeExecutable": { - "markdownDescription": "The path to the Node.js executable. If not assigned, tries to find Node.js path via a PATH variable or a `which` command. This is applied only when `vitest.shellType` is `child_process` (the default).", + "markdownDescription": "The path to the Node.js executable. If not assigned, Vitest just passes down `'node'` to `child_process.spawn`. This is applied only when `vitest.shellType` is `child_process` (the default).", "type": "string", "scope": "window" }, diff --git a/src/api/child_process.ts b/src/api/child_process.ts index 1af0f32..6c33c9c 100644 --- a/src/api/child_process.ts +++ b/src/api/child_process.ts @@ -34,7 +34,7 @@ export async function createVitestProcess(pkg: VitestPackage) { const server = createServer().listen(port) const wss = new WebSocketServer({ server }) const wsAddress = `ws://localhost:${port}` - const vitest = spawn('node', [...execArgv, workerPath], { + const vitest = spawn(getConfig(pkg.folder).nodeExecutable || 'node', [...execArgv, workerPath], { env: { ...process.env, ...env,