expose upgrade through cli

This commit is contained in:
Martin Iwanowski 2015-11-23 13:26:45 +01:00
parent c742ab7e66
commit 72406d37dd
1 changed files with 4 additions and 0 deletions

4
nvm.sh
View File

@ -1461,6 +1461,7 @@ nvm() {
echo 'Usage:' echo 'Usage:'
echo ' nvm help Show this message' echo ' nvm help Show this message'
echo ' nvm --version Print out the latest released version of nvm' echo ' nvm --version Print out the latest released version of nvm'
echo ' nvm --upgrade Upgrades nvm if newer version is available'
echo ' nvm install [-s] <version> Download and install a <version>, [-s] from source. Uses .nvmrc if available' echo ' nvm install [-s] <version> Download and install a <version>, [-s] from source. Uses .nvmrc if available'
echo ' --reinstall-packages-from=<version> When installing, reinstall packages installed in <node|iojs|node version number>' echo ' --reinstall-packages-from=<version> When installing, reinstall packages installed in <node|iojs|node version number>'
echo ' nvm uninstall <version> Uninstall a version' echo ' nvm uninstall <version> Uninstall a version'
@ -2223,6 +2224,9 @@ $NVM_LS_REMOTE_POST_MERGED_OUTPUT" | command grep -v "N/A" | command sed '/^$/d'
"--version" ) "--version" )
echo "0.29.0" echo "0.29.0"
;; ;;
"--upgrade" )
nvm_get_latest
;;
"unload" ) "unload" )
unset -f nvm nvm_print_versions nvm_checksum \ unset -f nvm nvm_print_versions nvm_checksum \
nvm_iojs_prefix nvm_node_prefix \ nvm_iojs_prefix nvm_node_prefix \