Skip to content
Myr

[New] `nvm install`: Print the version that is being installed

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

authored by Peter Dave Hello · committed by Jordan Harband · parent f7763c8 · Browse files · 2 files+7 added−0 removed
This commit

State

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

Diff stats

2 files+7 added−0 removed

  • tests:+2 added−0 removed
  • other:+5 added−0 removed

2 files+7 added−0 removed

modified:test/installation_node/install hook+2 added
20 unmodified lines
2122OUTPUT="$(NVM_INSTALL_THIRD_PARTY_HOOK=succeed nvm install "${VERSION}")"23USE_OUTPUT="$(nvm use "${VERSION}")"24EXPECTED_OUTPUT="${VERSION} node std binary ${VERSION_PATH}25Downloading and installing node ${VERSION}...26${USE_OUTPUT}27${USE_OUTPUT}" # double use output is from the normal install in succeed()2829[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"
2 unmodified lines
3233OUTPUT="$(NVM_INSTALL_THIRD_PARTY_HOOK=fail nvm install "${VERSION}" || echo 'failed')"34USE_OUTPUT="$(nvm use "${VERSION}")"35EXPECTED_OUTPUT="${VERSION} node std binary ${VERSION_PATH}36Downloading and installing node ${VERSION}...37${USE_OUTPUT}38failed"3940[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"
2 unmodified lines
modified:nvm.sh+5 added
1579 unmodified lines
1580 local TARBALL1581 local TMPDIR1582 local VERSION_PATH15831584 local NODE_OR_IOJS1585 if [ "${FLAVOR}" = 'node' ]; then1586 NODE_OR_IOJS="${FLAVOR}"1587 fi1588 nvm_echo "Downloading and installing ${NODE_OR_IOJS-} ${VERSION}..."1589 TARBALL="$(nvm_download_artifact "${FLAVOR}" binary "${TYPE-}" "${VERSION}" | command tail -1)"1590 if [ -f "${TARBALL}" ]; then1591 TMPDIR="$(dirname "${TARBALL}")/files"1592 fi
1642 unmodified lines