mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
Fix which error when either node or nodejs is missing
This commit is contained in:
parent
737d03271f
commit
1ef7fd0aa5
@ -22,7 +22,7 @@ _b9_init_nodejs() {
|
||||
local NODEJS
|
||||
|
||||
. ~/.nvm/nvm.sh &> /dev/null || :
|
||||
for NODEJS in $(which node) $(which nodejs) /usr/local/bin/node /usr/bin/nodejs; do
|
||||
for NODEJS in $(which node 2>/dev/null) $(which nodejs 2>/dev/null) /usr/local/bin/node /usr/bin/nodejs; do
|
||||
[ -x $NODEJS ] && break
|
||||
NODEJS=""
|
||||
done
|
||||
@ -62,4 +62,4 @@ _b9_init_node_helper() {
|
||||
rm -rf node_modules
|
||||
$NPM install
|
||||
popd &> /dev/null
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user