Skip to content

Commit cf0ffff

Browse files
author
Uchio KONDO
committed
Search node binary first than nodejs
- Many of node.js managers like nodebrew install `node` command - OS package managers often install `nodejs`, e.g. Debian/Ubuntu - Thus, if OS has installed older version of `nodejs`, execjs detects and uses this preferentially
1 parent 7dd2a79 commit cf0ffff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/execjs/runtimes.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module Runtimes
2020

2121
Node = ExternalRuntime.new(
2222
name: "Node.js (V8)",
23-
command: ["nodejs", "node"],
23+
command: ["node", "nodejs"],
2424
runner_path: ExecJS.root + "/support/node_runner.js",
2525
encoding: 'UTF-8'
2626
)

0 commit comments

Comments
 (0)