nvm exec wrapper to execute commands with a specific node version

This commit is contained in:
Koen Punt
2014-03-15 15:58:32 +01:00
parent ba2a850253
commit f3d1770e3e
Executable
+14
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 $@