Skip to content
Myr

install: further support for older npm versions

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by elliottcable · committed by elliottcable · parent ea42646 · Browse files · 1 file+6 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−2 removed

  • other:+6 added−2 removed

1 file+6 added−2 removed

modified:install.sh+6 added-2 removed
150 unmodified lines
151 local NPM_VERSION152 NPM_VERSION="$(npm --version)"153 NPM_VERSION="${NPM_VERSION:--1}"154 [ "$NVM_DEBUG" = 0 ] && debug "NPM detected (at version ${NPM_VERSION}.)"155 [ "${NPM_VERSION%%[!0-9]*}" -gt 0 ] || return 0155 [ "${NPM_VERSION%%[!-0-9]*}" -gt 0 ] || return 0156157 local NPM_GLOBAL_MODULES158 NPM_GLOBAL_MODULES="$(npm list -g --depth=0 | sed '/ npm@/d')"158 NPM_GLOBAL_MODULES="$(159 npm list -g --depth=0 |160 sed '/ npm@/d' |161 sed '/ (empty)$/d'162 )"163164 local MODULE_COUNT165 MODULE_COUNT="$(166 printf %s\\n "$NPM_GLOBAL_MODULES" |
96 unmodified lines