Created
December 19, 2013 04:24
-
-
Save nvquanghuy/8034406 to your computer and use it in GitHub Desktop.
nvm-exec wrapper, source: https://github.com/koenpunt/nvm/blob/nvm-exec/nvm-exec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# File location: ~/.nvm/ | |
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 $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment