If nvm is deactivated, display "none" or "system" instead of the system node version

This commit is contained in:
Jordan Harband
2014-07-14 11:17:26 -07:00
parent 6e02e5a54c
commit 9912f7cc46
2 changed files with 14 additions and 2 deletions

View File

@@ -3,4 +3,8 @@
die () { echo $@ ; exit 1; }
. ../../nvm.sh
[ "$(nvm current)" = "$(node -v)" ] || die "Failed to find current version"
nvm deactivate 2>&1
[ "$(nvm current)" = "system" ] || [ "$(nvm current)" = "none" ] || die '"nvm current" did not report "system" or "none" when deactivated'