commit
6aa45732d8
5
nvm.sh
5
nvm.sh
|
@ -249,6 +249,7 @@ nvm() {
|
||||||
echo " nvm alias <name> <version> Set an alias named <name> pointing to <version>"
|
echo " nvm alias <name> <version> Set an alias named <name> pointing to <version>"
|
||||||
echo " nvm unalias <name> Deletes the alias named <name>"
|
echo " nvm unalias <name> Deletes the alias named <name>"
|
||||||
echo " nvm copy-packages <version> Install global NPM packages contained in <version> to current version"
|
echo " nvm copy-packages <version> Install global NPM packages contained in <version> to current version"
|
||||||
|
echo " nvm unload Unload NVM from shell"
|
||||||
echo
|
echo
|
||||||
echo "Example:"
|
echo "Example:"
|
||||||
echo " nvm install v0.10.24 Install a specific version number"
|
echo " nvm install v0.10.24 Install a specific version number"
|
||||||
|
@ -627,6 +628,10 @@ nvm() {
|
||||||
"--version" )
|
"--version" )
|
||||||
echo "0.7.0"
|
echo "0.7.0"
|
||||||
;;
|
;;
|
||||||
|
"unload" )
|
||||||
|
unset -f nvm nvm_print_versions nvm_checksum nvm_ls_remote nvm_ls nvm_remote_version nvm_version nvm_rc_version > /dev/null 2>&1
|
||||||
|
unset RC_VERSION NVM_NODEJS_ORG_MIRROR NVM_DIR NVM_CD_FLAGS > /dev/null 2>&1
|
||||||
|
;;
|
||||||
* )
|
* )
|
||||||
nvm help
|
nvm help
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
fail () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../nvm.sh
|
||||||
|
|
||||||
|
type nvm > /dev/null 2>&1 || fail "NVM not loaded"
|
||||||
|
|
||||||
|
nvm unload
|
||||||
|
|
||||||
|
type nvm > /dev/null 2>&1 && fail "NVM not unloaded" || exit 0
|
Loading…
Reference in New Issue