Browse Source

install: further support for older npm versions

master
elliottcable 10 years ago
parent
commit
4508f7c33e
  1. 8
      install.sh

8
install.sh

@ -152,10 +152,14 @@ nvm_check_global_modules() { @@ -152,10 +152,14 @@ nvm_check_global_modules() {
NPM_VERSION="$(npm --version)"
NPM_VERSION="${NPM_VERSION:--1}"
[ "$NVM_DEBUG" = 0 ] && debug "NPM detected (at version ${NPM_VERSION}.)"
[ "${NPM_VERSION%%[!0-9]*}" -gt 0 ] || return 0
[ "${NPM_VERSION%%[!-0-9]*}" -gt 0 ] || return 0
local NPM_GLOBAL_MODULES
NPM_GLOBAL_MODULES="$(npm list -g --depth=0 | sed '/ npm@/d')"
NPM_GLOBAL_MODULES="$(
npm list -g --depth=0 |
sed '/ npm@/d' |
sed '/ (empty)$/d'
)"
local MODULE_COUNT
MODULE_COUNT="$(

Loading…
Cancel
Save