install: Replace wget with curl.

curl uses Happy Eyeballs to avoid long timeouts on systems with broken
IPv6.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-06-24 16:28:27 -07:00
committed by Tim Abbott
parent d428c0e0dd
commit 91bfebca7d
25 changed files with 56 additions and 107 deletions

View File

@@ -36,11 +36,11 @@ if [ "$current_node_version" != "v$node_version" ] || ! [ -L "$node_wrapper_path
[ "$(nvm --version)" != "$nvm_version" ]
}; then
mkdir -p "$NVM_DIR"
wget_opts=(-nv)
curl_opts=(-L)
if [ -n "${CUSTOM_CA_CERTIFICATES:-}" ]; then
wget_opts+=(--ca-certificate "${CUSTOM_CA_CERTIFICATES}")
curl_opts+=(--cacert "${CUSTOM_CA_CERTIFICATES}")
fi
wget "${wget_opts[@]}" -O- "https://raw.githubusercontent.com/nvm-sh/nvm/v$nvm_version/install.sh" | bash
curl "${curl_opts[@]}" "https://raw.githubusercontent.com/nvm-sh/nvm/v$nvm_version/install.sh" | bash
# shellcheck source=/dev/null
. "$NVM_DIR/nvm.sh"
fi