[New] `nvm install`: Print the version that is being installed
parent
f7763c8ba9
commit
9c92b5a4ea
5
nvm.sh
5
nvm.sh
|
@ -1581,6 +1581,11 @@ nvm_install_binary() {
|
||||||
local TMPDIR
|
local TMPDIR
|
||||||
local VERSION_PATH
|
local VERSION_PATH
|
||||||
|
|
||||||
|
local NODE_OR_IOJS
|
||||||
|
if [ "${FLAVOR}" = 'node' ]; then
|
||||||
|
NODE_OR_IOJS="${FLAVOR}"
|
||||||
|
fi
|
||||||
|
nvm_echo "Downloading and installing ${NODE_OR_IOJS-} ${VERSION}..."
|
||||||
TARBALL="$(nvm_download_artifact "${FLAVOR}" binary "${TYPE-}" "${VERSION}" | command tail -1)"
|
TARBALL="$(nvm_download_artifact "${FLAVOR}" binary "${TYPE-}" "${VERSION}" | command tail -1)"
|
||||||
if [ -f "${TARBALL}" ]; then
|
if [ -f "${TARBALL}" ]; then
|
||||||
TMPDIR="$(dirname "${TARBALL}")/files"
|
TMPDIR="$(dirname "${TARBALL}")/files"
|
||||||
|
|
|
@ -22,6 +22,7 @@ fail() {
|
||||||
OUTPUT="$(NVM_INSTALL_THIRD_PARTY_HOOK=succeed nvm install "${VERSION}")"
|
OUTPUT="$(NVM_INSTALL_THIRD_PARTY_HOOK=succeed nvm install "${VERSION}")"
|
||||||
USE_OUTPUT="$(nvm use "${VERSION}")"
|
USE_OUTPUT="$(nvm use "${VERSION}")"
|
||||||
EXPECTED_OUTPUT="${VERSION} node std binary ${VERSION_PATH}
|
EXPECTED_OUTPUT="${VERSION} node std binary ${VERSION_PATH}
|
||||||
|
Downloading and installing node ${VERSION}...
|
||||||
${USE_OUTPUT}
|
${USE_OUTPUT}
|
||||||
${USE_OUTPUT}" # double use output is from the normal install in succeed()
|
${USE_OUTPUT}" # double use output is from the normal install in succeed()
|
||||||
|
|
||||||
|
@ -32,6 +33,7 @@ ${USE_OUTPUT}" # double use output is from the normal install in succeed()
|
||||||
OUTPUT="$(NVM_INSTALL_THIRD_PARTY_HOOK=fail nvm install "${VERSION}" || echo 'failed')"
|
OUTPUT="$(NVM_INSTALL_THIRD_PARTY_HOOK=fail nvm install "${VERSION}" || echo 'failed')"
|
||||||
USE_OUTPUT="$(nvm use "${VERSION}")"
|
USE_OUTPUT="$(nvm use "${VERSION}")"
|
||||||
EXPECTED_OUTPUT="${VERSION} node std binary ${VERSION_PATH}
|
EXPECTED_OUTPUT="${VERSION} node std binary ${VERSION_PATH}
|
||||||
|
Downloading and installing node ${VERSION}...
|
||||||
${USE_OUTPUT}
|
${USE_OUTPUT}
|
||||||
failed"
|
failed"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue