Browse Source

nvm exec wrapper to execute commands with a specific node version

master
Koen Punt 11 years ago
parent
commit
f3d1770e3e
  1. 14
      nvm-exec

14
nvm-exec

@ -0,0 +1,14 @@ @@ -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 $@
Loading…
Cancel
Save