This commit is contained in:
Wes Todd
2023-07-29 01:09:33 +05:30
committed by GitHub
2 changed files with 26 additions and 3 deletions

View File

@@ -448,7 +448,11 @@ nvm_do_install() {
# Source nvm
# 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

View File

@@ -1,8 +1,27 @@
#!/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; }
#nvm install
NVM_ENV=testing \. ../../install.sh
#nvm_do_install is available
type nvm_do_install > /dev/null 2>&1 || die 'nvm_do_install is not available'
setup
cleanup
#nvm install --no-use
NVM_NOUSE=true
NVM_ENV=testing \. ../../install.sh > /dev/null
setup