diff options
author | Carsten Brandt <mail@cebe.cc> | 2017-08-18 17:46:03 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2017-08-19 03:15:28 +0300 |
commit | 5ec72ab5b27c5c83cee9ff568cf75a9479d4b83a (patch) | |
tree | d64ad2ecf3bae625340f90cf5a8efc380d119da3 /scripts | |
parent | f4650b5d4b2be2c04c229cc53aa930e260af9b4e (diff) |
scripts: Make install.sh find nodejs on debian
Credit: @cebe
Reviewed-By: @iarna
PR-URL: https://github.com/npm/npm/pull/18229
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/install.sh b/scripts/install.sh index 8ec16f95b..a5ce5311f 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -53,6 +53,11 @@ export npm_config_loglevel # make sure that node exists node=`which node 2>&1` ret=$? +# if not found, try "nodejs" as it is the case on debian +if [ $ret -ne 0 ]; then + node=`which nodejs 2>&1` + ret=$? +fi if [ $ret -eq 0 ] && [ -x "$node" ]; then (exit 0) else |