mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-06-27 03:28:43 +00:00
Merge 3225ca47dd
into 3afdce0a2c
This commit is contained in:
commit
b7beeccd6c
@ -448,7 +448,11 @@ nvm_do_install() {
|
|||||||
|
|
||||||
# Source nvm
|
# Source nvm
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
\. "$(nvm_install_dir)/nvm.sh"
|
if [ -z "${NVM_NOUSE-}" ] ; then
|
||||||
|
\. "$(nvm_install_dir)/nvm.sh"
|
||||||
|
else
|
||||||
|
\. "$(nvm_install_dir)/nvm.sh" --no-use
|
||||||
|
fi
|
||||||
|
|
||||||
nvm_check_global_modules
|
nvm_check_global_modules
|
||||||
|
|
||||||
|
@ -1,8 +1,27 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
setup () {
|
||||||
|
#nvm_do_install is available
|
||||||
|
type nvm_do_install > /dev/null 2>&1 || die 'nvm_do_install is not available'
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup () {
|
||||||
|
unset NVM_ENV
|
||||||
|
unset NVM_NOUSE
|
||||||
|
rm -rf "$NVM_DIR/lib" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
die () { echo "$@" ; exit 1; }
|
die () { echo "$@" ; exit 1; }
|
||||||
|
|
||||||
|
#nvm install
|
||||||
NVM_ENV=testing \. ../../install.sh
|
NVM_ENV=testing \. ../../install.sh
|
||||||
|
|
||||||
#nvm_do_install is available
|
setup
|
||||||
type nvm_do_install > /dev/null 2>&1 || die 'nvm_do_install is not available'
|
|
||||||
|
cleanup
|
||||||
|
|
||||||
|
#nvm install --no-use
|
||||||
|
NVM_NOUSE=true
|
||||||
|
NVM_ENV=testing \. ../../install.sh > /dev/null
|
||||||
|
|
||||||
|
setup
|
||||||
|
Loading…
Reference in New Issue
Block a user