mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 22:31:51 +00:00

`nvm deactivate` does not really remove the nvm command, it just remove the entries from $PATH and $MANPATH previously adde with `nvm use`.
15 lines
343 B
Bash
Executable File
15 lines
343 B
Bash
Executable File
#!/bin/sh
|
|
|
|
mkdir -p ../../v0.2.3
|
|
|
|
die () { echo $@ ; exit 1; }
|
|
|
|
[[ $PATH != *v0.2.3/*/bin* ]] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2
|
|
|
|
. ../../nvm.sh
|
|
nvm use v0.2.3 &&
|
|
[[ $PATH == *v0.2.3/*/bin* ]] || die "Failed to activate v0.2.3"
|
|
|
|
nvm deactivate &&
|
|
[[ $PATH != *v0.2.3/*/bin* ]] || die "Failed to deactivate v0.2.3"
|