This commit is contained in:
Olivier Mengué 2014-09-16 17:14:45 +00:00
commit 1adecc131f

8
nvm.sh
View File

@ -551,14 +551,10 @@ nvm() {
nvm use $VERSION
if ! nvm_has "npm" ; then
echo "Installing npm..."
if [ "`expr "$VERSION" : '\(^v0\.1\.\)'`" != '' ]; then
if [[ $VERSION == v0.1.* || $VERSION == v0.2.[0-2] ]]; then
echo "npm requires node v0.2.3 or higher" >&2
elif [ "`expr "$VERSION" : '\(^v0\.2\.\)'`" != '' ]; then
if [ "`expr "$VERSION" : '\(^v0\.2\.[0-2]$\)'`" != '' ]; then
echo "npm requires node v0.2.3 or higher" >&2
else
elif [[ $VERSION == v0.2.* ]]; then
nvm_download https://npmjs.org/install.sh -o - | clean=yes npm_install=0.2.19 sh
fi
else
nvm_download https://npmjs.org/install.sh -o - | clean=yes sh
fi