Skip to content

Commit

Permalink
fix: respect nodeExecutable
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Jan 21, 2025
1 parent 35832ab commit ed32fc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion src/api/child_process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ed32fc9

Please sign in to comment.