[New] After installing, ensure that the default is set.

This commit is contained in:
Jordan Harband
2016-02-04 00:26:33 -08:00
parent 731c2f3f70
commit 44541b416f
4 changed files with 14 additions and 0 deletions

2
nvm.sh
View File

@@ -1730,6 +1730,7 @@ nvm() {
if nvm use "$VERSION" && [ ! -z "$REINSTALL_PACKAGES_FROM" ] && [ "_$REINSTALL_PACKAGES_FROM" != "_N/A" ]; then
nvm reinstall-packages "$REINSTALL_PACKAGES_FROM"
fi
nvm_ensure_default_set "$provided_version"
return $?
fi
@@ -1775,6 +1776,7 @@ nvm() {
fi
if [ "$NVM_INSTALL_SUCCESS" = true ] && nvm use "$VERSION"; then
nvm_ensure_default_set "$provided_version"
if [ ! -z "$REINSTALL_PACKAGES_FROM" ] \
&& [ "_$REINSTALL_PACKAGES_FROM" != "_N/A" ]; then
nvm reinstall-packages "$REINSTALL_PACKAGES_FROM"