Skip to content

Commit

Permalink
[Fix] nvm install -b: do not attempt to download source on a failed…
Browse files Browse the repository at this point in the history
… binary download with `-b`

Fixes 3399
  • Loading branch information
ljharb committed Aug 1, 2024
1 parent cce4fed commit f451b7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2437,7 +2437,7 @@ nvm_download_artifact() {
nvm_err "Downloading ${TARBALL_URL}..."
nvm_download -L -C - "${PROGRESS_BAR}" "${TARBALL_URL}" -o "${TARBALL}" || (
command rm -rf "${TARBALL}" "${tmpdir}"
nvm_err "Binary download from ${TARBALL_URL} failed, trying source."
nvm_err "download from ${TARBALL_URL} failed"
return 4
)

Expand Down Expand Up @@ -3560,7 +3560,7 @@ nvm() {
EXIT_CODE=-1
fi

if [ $EXIT_CODE -ne 0 ]; then
if [ $EXIT_CODE -ne 0 ] && [ $nosource -ne 1 ]; then
if [ -z "${NVM_MAKE_JOBS-}" ]; then
nvm_get_make_jobs
fi
Expand Down

0 comments on commit f451b7c

Please sign in to comment.