parent
bb2fe618cb
commit
0aac462b15
26
nvm.sh
26
nvm.sh
|
@ -929,9 +929,16 @@ nvm_install_iojs_binary() {
|
||||||
tmpdir="$NVM_DIR/bin/iojs-${t}"
|
tmpdir="$NVM_DIR/bin/iojs-${t}"
|
||||||
local tmptarball
|
local tmptarball
|
||||||
tmptarball="$tmpdir/iojs-${t}.tar.gz"
|
tmptarball="$tmpdir/iojs-${t}.tar.gz"
|
||||||
|
local NVM_INSTALL_ERRORED
|
||||||
|
command mkdir -p "$tmpdir" && \
|
||||||
|
nvm_download -L -C - --progress-bar $url -o "$tmptarball" || \
|
||||||
|
NVM_INSTALL_ERRORED=true
|
||||||
|
if grep '404 Not Found' "$tmptarball" >/dev/null; then
|
||||||
|
NVM_INSTALL_ERRORED=true
|
||||||
|
echo >&2 "HTTP 404 at URL $url";
|
||||||
|
fi
|
||||||
if (
|
if (
|
||||||
command mkdir -p "$tmpdir" && \
|
[ "$NVM_INSTALL_ERRORED" != true ] && \
|
||||||
nvm_download -L -C - --progress-bar $url -o "$tmptarball" && \
|
|
||||||
echo "WARNING: checksums are currently disabled for io.js" >&2 && \
|
echo "WARNING: checksums are currently disabled for io.js" >&2 && \
|
||||||
# nvm_checksum "$tmptarball" $sum && \
|
# nvm_checksum "$tmptarball" $sum && \
|
||||||
command tar -xzf "$tmptarball" -C "$tmpdir" --strip-components 1 && \
|
command tar -xzf "$tmptarball" -C "$tmpdir" --strip-components 1 && \
|
||||||
|
@ -941,7 +948,7 @@ nvm_install_iojs_binary() {
|
||||||
); then
|
); then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
echo "Binary download failed, trying source." >&2
|
echo >&2 "Binary download failed, trying source." >&2
|
||||||
command rm -rf "$tmptarball" "$tmpdir"
|
command rm -rf "$tmptarball" "$tmpdir"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
@ -983,9 +990,16 @@ nvm_install_node_binary() {
|
||||||
tmpdir="$NVM_DIR/bin/node-${t}"
|
tmpdir="$NVM_DIR/bin/node-${t}"
|
||||||
local tmptarball
|
local tmptarball
|
||||||
tmptarball="$tmpdir/node-${t}.tar.gz"
|
tmptarball="$tmpdir/node-${t}.tar.gz"
|
||||||
|
local NVM_INSTALL_ERRORED
|
||||||
|
command mkdir -p "$tmpdir" && \
|
||||||
|
nvm_download -L -C - --progress-bar $url -o "$tmptarball" || \
|
||||||
|
NVM_INSTALL_ERRORED=true
|
||||||
|
if grep '404 Not Found' "$tmptarball" >/dev/null; then
|
||||||
|
NVM_INSTALL_ERRORED=true
|
||||||
|
echo >&2 "HTTP 404 at URL $url";
|
||||||
|
fi
|
||||||
if (
|
if (
|
||||||
command mkdir -p "$tmpdir" && \
|
[ "$NVM_INSTALL_ERRORED" != true ] && \
|
||||||
nvm_download -L -C - --progress-bar $url -o "$tmptarball" && \
|
|
||||||
nvm_checksum "$tmptarball" $sum && \
|
nvm_checksum "$tmptarball" $sum && \
|
||||||
command tar -xzf "$tmptarball" -C "$tmpdir" --strip-components 1 && \
|
command tar -xzf "$tmptarball" -C "$tmpdir" --strip-components 1 && \
|
||||||
command rm -f "$tmptarball" && \
|
command rm -f "$tmptarball" && \
|
||||||
|
@ -994,7 +1008,7 @@ nvm_install_node_binary() {
|
||||||
); then
|
); then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
echo "Binary download failed, trying source." >&2
|
echo >&2 "Binary download failed, trying source."
|
||||||
command rm -rf "$tmptarball" "$tmpdir"
|
command rm -rf "$tmptarball" "$tmpdir"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue