parent
e6bd207624
commit
0871131dfd
9
nvm-exec
9
nvm-exec
|
@ -4,12 +4,11 @@ DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
source "$DIR/nvm.sh"
|
source "$DIR/nvm.sh"
|
||||||
|
|
||||||
if [ ! "$NODE_VERSION" ]; then
|
if [ -n "$NODE_VERSION" ]; then
|
||||||
echo 'NODE_VERSION not set'
|
nvm use $NODE_VERSION || (echo "NODE_VERSION not set" && exit 127)
|
||||||
exit 1
|
else
|
||||||
|
nvm use || (echo "No .nvmrc file found" && exit 127)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
nvm use $NODE_VERSION
|
|
||||||
|
|
||||||
exec $@
|
exec $@
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue