From cf0ffffa7881ede3c6bacee09d001f669cf82dc1 Mon Sep 17 00:00:00 2001 From: Uchio KONDO Date: Tue, 18 Dec 2018 12:39:04 +0900 Subject: [PATCH] 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 --- lib/execjs/runtimes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/execjs/runtimes.rb b/lib/execjs/runtimes.rb index ac6cd90..4ca5e1a 100644 --- a/lib/execjs/runtimes.rb +++ b/lib/execjs/runtimes.rb @@ -20,7 +20,7 @@ module ExecJS Node = ExternalRuntime.new( name: "Node.js (V8)", - command: ["nodejs", "node"], + command: ["node", "nodejs"], runner_path: ExecJS.root + "/support/node_runner.js", encoding: 'UTF-8' )