Skip to content
Myr

install: support `npm`s lower than v2

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

authored by elliottcable · committed by elliottcable · parent a216f56 · Browse files · 1 file+2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:install.sh+2 added-2 removed
148 unmodified lines
149 command -v npm >/dev/null 2>&1 || return 0150151 local NPM_VERSION152 NPM_VERSION="$(npm --version)"153 NPM_VERSION="${NPM_VERSION:-0}"153 NPM_VERSION="${NPM_VERSION:--1}"154 [ "$NVM_DEBUG" = 0 ] && debug "NPM detected (at version ${NPM_VERSION}.)"155 [ "${NPM_VERSION%%[!0-9]*}" -gt 1 ] || 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')"159
99 unmodified lines