just use nvm install to install and activate correct version
This commit is contained in:
@ -41,15 +41,8 @@ function install_node {
|
|||||||
ulimit -c unlimited
|
ulimit -c unlimited
|
||||||
fi
|
fi
|
||||||
|
|
||||||
nvm use "$version"
|
echo "installing node $version";
|
||||||
NVM_USE_CODE=$?
|
crit nvm install "$version"
|
||||||
|
|
||||||
if [[ $NVM_USE_CODE -gt 0 ]]; then
|
|
||||||
# nvm use failed
|
|
||||||
echo "installing node $version";
|
|
||||||
crit nvm install "$version";
|
|
||||||
# fresh installs should include npm, but lets check anyway
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$(which npm)" == "" ]]; then
|
if [[ "$(which npm)" == "" ]]; then
|
||||||
echo "npm is missing, reinstalling node version $version";
|
echo "npm is missing, reinstalling node version $version";
|
||||||
|
|||||||
Reference in New Issue
Block a user