We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
nvm install -b
1 parent f027a29 commit 3c4669dCopy full SHA for 3c4669d
nvm.sh
@@ -3558,6 +3558,10 @@ nvm() {
3558
EXIT_CODE=$?
3559
else
3560
EXIT_CODE=-1
3561
+ if [ $nosource -eq 1 ]; then
3562
+ nvm_err "Binary download is not available for ${VERSION}"
3563
+ EXIT_CODE=999
3564
+ fi
3565
fi
3566
3567
if [ $EXIT_CODE -ne 0 ]; then
test/fast/Unit tests/nvm install -b
@@ -0,0 +1,16 @@
1
+#!/bin/sh
2
+
3
+die () { echo "$@" ; exit 1; }
4
5
+\. ../../nvm.sh
6
7
+VERSION="0.7.0"
8
9
+EXIT_CODE=$(nvm install -b "${VERSION}" ; echo $?)
10
11
+[ $EXIT_CODE -eq 999 ] || die "Expected exit code 999, got ${EXIT_CODE}"
12
13
+ACTUAL="$(nvm install -b "${VERSION}" 2>&1)"
14
+EXPECTED="Binary download is not available for ${VERSION}"
15
16
+diff $ACTUAL $EXPECTED || die
0 commit comments