You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
310 B
Bash
14 lines
310 B
Bash
#!/bin/bash
|
|
|
|
DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
. "$DIR/nvm.sh" --no-use
|
|
|
|
if [ -n "$NODE_VERSION" ]; then
|
|
nvm use $NODE_VERSION > /dev/null || (echo "NODE_VERSION not set" >&2 && exit 127)
|
|
else
|
|
nvm use > /dev/null || (echo "No .nvmrc file found" >&2 && exit 127)
|
|
fi
|
|
|
|
exec "$@"
|