Skip to content

Commit

Permalink
npm checks only node.exe and not node on local dir
Browse files Browse the repository at this point in the history
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: #200
  • Loading branch information
rgoulais authored and isaacs committed Jun 29, 2019
1 parent 1c2ca99 commit fa80714
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/npm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa80714

Please sign in to comment.