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

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

No files matched your search

+1 -1
View File
@@ -130,7 +130,7 @@ nvm_has_system_iojs() {
}
nvm_is_version_installed() {
[ -n "${1-}" ] && [ -d "$(nvm_version_path "${1-}" 2> /dev/null)" ]
[ -n "${1-}" ] && [ -x "$(nvm_version_path "$1" 2> /dev/null)"/bin/node ]
}
nvm_print_npm_version() {