nvm/test/install_script/nvm_do_install
Dan Lemon 3225ca47dd
Add installer test for NVM_NOUSE
Installs nvm via the install.sh script, then removes nvm, and reinstalls with `NVM_NOUSE` variable set to true.
2020-05-25 11:14:27 -07:00

28 lines
416 B
Bash
Executable File

#!/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
setup
cleanup
#nvm install --no-use
NVM_NOUSE=true
NVM_ENV=testing \. ../../install.sh > /dev/null
setup