Skip to content
Myr

Only print npm version if it exists

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

authored by Andrew Crites · committed by Andrew Crites · parent caa69bc · 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:nvm.sh+6 added-2 removed
1358 unmodified lines
1359 fi13601361 if [ "_$VERSION" = '_system' ]; then1362 local NPM_VERSION1363 if nvm_has "npm"; then1363 NPM_VERSION="(npm v$(npm --version 2>/dev/null))"1364 NPM_VERSION="(npm v$(npm --version 2>/dev/null))"1365 fi1366 if nvm_has_system_node && nvm deactivate >/dev/null 2>&1; then1367 echo "Now using system version of node: $(node -v 2>/dev/null) $NPM_VERSION"1368 return1369 elif nvm_has_system_iojs && nvm deactivate >/dev/null 2>&1; then
40 unmodified lines
1410 if [ "$NVM_SYMLINK_CURRENT" = true ]; then1411 command rm -f "$NVM_DIR/current" && ln -s "$NVM_VERSION_DIR" "$NVM_DIR/current"1412 fi1413 local NPM_VERSION1414 if nvm_has "npm"; then1412 NPM_VERSION="(npm v$(npm --version 2>/dev/null))"1415 NPM_VERSION="(npm v$(npm --version 2>/dev/null))"1416 fi1417 if nvm_is_iojs_version "$VERSION"; then1418 echo "Now using io.js $(nvm_strip_iojs_prefix "$VERSION") $NPM_VERSION"1419 else1420 echo "Now using node $VERSION $NPM_VERSION"
349 unmodified lines