[Fix] Improve nvm_is_version_installed to check for a node executable instead of root dir

This commit is contained in:
Joshua Li
2018-05-31 15:26:30 -07:00
committed by Jordan Harband
parent a5f42d9cea
commit 0cdc184168
6 changed files with 27 additions and 19 deletions

View File

@@ -2,13 +2,11 @@
set -ex
cd ../..
mkdir v0.0.1
mkdir src/node-v0.0.1
\. ../../nvm.sh
\. ../common.sh
sudo touch v0.0.1/sudo
. ./nvm.sh
make_fake_node v0.0.1
sudo touch ""$(nvm_version_path v0.0.1)"/sudo"
RETURN_MESSAGE="$(nvm uninstall v0.0.1 2>&1 || echo)"
CHECK_FOR="Cannot uninstall, incorrect permissions on installation folder"