From 4bec4f11184b2108727542365535f0bed42c9a9d Mon Sep 17 00:00:00 2001 From: Raphael Goulais Date: Wed, 5 Jun 2019 12:43:47 +0200 Subject: [PATCH] npm checks only node.exe and not node on local dir npm find local node.exe on windows, but relies on global node installation on linux. Added a test to check for a local installation of node before relying on the system wide installation. Close: https://github.com/npm/cli/pull/200 --- bin/npm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/npm b/bin/npm index 5acd6fb61a798..4183703a7857e 100755 --- a/bin/npm +++ b/bin/npm @@ -8,6 +8,9 @@ case `uname` in esac NODE_EXE="$basedir/node.exe" +if ! [ -x "$NODE_EXE" ]; then + NODE_EXE="$basedir/node" +fi if ! [ -x "$NODE_EXE" ]; then NODE_EXE=node fi