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:
Dan Lemon 2020-05-25 00:41:22 +02:00 committed by Jordan Harband
parent b7fb5222ff
commit 3225ca47dd
No known key found for this signature in database
GPG Key ID: 9F6A681E35EF8B56

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