mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-08 21:27:47 +00:00
Fix nvm ls v1.0.3
so that it locates iojs-v1.0.3
.
Also fix `nvm uninstall v1.0.3` so it won't uninstall it if it's the current version. node versions will still take priority if there's ever a version overlap.
This commit is contained in:
14
test/slow/nvm use/Running "nvm use v1.0.0" uses iojs-v1.0.0 iojs version
Executable file
14
test/slow/nvm use/Running "nvm use v1.0.0" uses iojs-v1.0.0 iojs version
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
die () { echo $@ ; exit 1; }
|
||||
|
||||
. ../../../nvm.sh
|
||||
|
||||
nvm deactivate 2>&1 >/dev/null || die 'deactivate failed'
|
||||
|
||||
nvm use 'v1.0.0' || die 'nvm use v1.0.0 failed'
|
||||
OUTPUT="$(nvm current)"
|
||||
EXPECTED_OUTPUT="$(nvm_version v1.0.0)"
|
||||
|
||||
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \
|
||||
|| die "'nvm use v1.0.0' + 'nvm current' did not output '$EXPECTED_OUTPUT'; got '$OUTPUT'"
|
Reference in New Issue
Block a user