mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-17 09:31:51 +00:00
Refactor npm install
This commit is contained in:
parent
f6796075f3
commit
b641675dbe
6
nvm.sh
6
nvm.sh
@ -428,14 +428,10 @@ nvm() {
|
||||
nvm use $VERSION
|
||||
if ! nvm_has "npm" ; then
|
||||
echo "Installing npm..."
|
||||
if [[ $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 [[ $VERSION == v0.2.* ]]; then
|
||||
if [[ $VERSION == v0.2.[0-2] ]]; then
|
||||
echo "npm requires node v0.2.3 or higher" >&2
|
||||
else
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user