From 3225ca47dd0ee17454a0d210f6e5184aea05b82d Mon Sep 17 00:00:00 2001 From: Dan Lemon Date: Mon, 25 May 2020 00:41:22 +0200 Subject: [PATCH] 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. --- test/install_script/nvm_do_install | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/test/install_script/nvm_do_install b/test/install_script/nvm_do_install index 5fb0d27..9e2930b 100755 --- a/test/install_script/nvm_do_install +++ b/test/install_script/nvm_do_install @@ -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