Merge pull request #319 from koenpunt/nvm-exec

nvm exec wrapper to execute commands with a specific node version
master
Jordan Harband 2014-03-15 11:40:02 -07:00
commit e6887d500f
1 changed files with 14 additions and 0 deletions

14
nvm-exec 100755
View File

@ -0,0 +1,14 @@
#!/bin/bash
DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$DIR/nvm.sh"
if [ ! "$NODE_VERSION" ]; then
echo 'NODE_VERSION not set'
exit 1
fi
nvm use $NODE_VERSION
exec $@