mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 14:21:50 +00:00
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.
This commit is contained in:
parent
b7fb5222ff
commit
3225ca47dd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user