nvm/nvm-exec

15 lines
273 B
Plaintext
Raw Normal View History

#!/bin/bash
DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$DIR/nvm.sh"
if [ -n "$NODE_VERSION" ]; then
nvm use $NODE_VERSION || (echo "NODE_VERSION not set" && exit 127)
else
nvm use || (echo "No .nvmrc file found" && exit 127)
fi
2014-03-16 02:41:50 +08:00
exec $@