Post install hook

- NVM_POST_INSTALL env variable is executed after `nvm install` if it is set
This commit is contained in:
Robert Tod 2016-12-05 22:38:37 -05:00
parent 2af47b0034
commit 827c7baa01

4
nvm.sh
View File

@ -2464,6 +2464,10 @@ nvm() {
&& [ "_$REINSTALL_PACKAGES_FROM" != "_N/A" ]; then
nvm reinstall-packages "$REINSTALL_PACKAGES_FROM"
fi
if [ ! -z "${NVM_POST_INSTALL-}" ]; then
nvm_echo 'Running post install hook.'
($NVM_POST_INSTALL)
fi
fi
return $?
;;