[Fix] install: Ignore npm command under $NVM_DIR when checking for global modules

This commit is contained in:
David Moles committed 2020-11-30 15:22:24 -08:00
1 parent ed321f1df0
commit d4eba354b5
2 files changed
+13 -2

No files matched your search

+3 -1
View File
@@ -262,7 +262,9 @@ nvm_detect_profile() {
# Node, and warn them if so.
#
nvm_check_global_modules() {
command -v npm >/dev/null 2>&1 || return 0
local NPM_COMMAND
NPM_COMMAND="$(command -v npm 2>/dev/null)" || return 0
[ -n "${NVM_DIR}" ] && [ -z "${NPM_COMMAND%%$NVM_DIR/*}" ] && return 0
local NPM_VERSION
NPM_VERSION="$(npm --version)"