nvm/test/fast/Running "nvm deactivate" sh...

15 lines
379 B
Plaintext
Raw Normal View History

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