mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-10-30 17:25:51 +08:00
[Fix] Improve nvm_is_version_installed to check for a node executable instead of root dir
This commit is contained in:
committed by
Jordan Harband
parent
a5f42d9cea
commit
0cdc184168
@@ -2,13 +2,14 @@
|
||||
|
||||
set -ex
|
||||
|
||||
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
|
||||
\. ../common.sh
|
||||
|
||||
make_fake_node v0.2.3
|
||||
|
||||
[ `expr $PATH : ".*v0.2.3/.*/bin.*"` = 0 ] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2
|
||||
|
||||
nvm use --delete-prefix v0.2.3 || die "Failed to activate v0.2.3"
|
||||
[ `expr "$PATH" : ".*v0.2.3/.*/bin.*"` != 0 ] || die "PATH not set up properly"
|
||||
|
||||
Reference in New Issue
Block a user