nvm/test/fast/Running "nvm deactivate" should unset the nvm environment variables.
Fraser Tweedale a3331ffdb0 fix errors due to use of unportable == operator
The `==` operator is not defined by POSIX and many test(1) (also
spelled `[`) implementations do not support it.  Replace uses of
`==` with the POSIX-conformant `=` equality operator.
2014-02-21 21:05:40 +10:00

15 lines
378 B
Bash
Executable File

#!/bin/sh
mkdir -p ../../v0.2.3
die () { echo $@ ; exit 1; }
[ `expr $PATH : ".*v0.2.3/.*/bin"` = 0 ] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2
. ../../nvm.sh
nvm use v0.2.3 &&
[ `expr $PATH : ".*v0.2.3/.*/bin"` != 0 ] || die "Failed to activate v0.2.3"
nvm deactivate &&
[ `expr $PATH : ".*v0.2.3/.*/bin"` != 0 ] || die "Failed to deactivate v0.2.3"