mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-10 16:49:06 +00:00
[patch] HTTP -> HTTPS
This commit is contained in:
@@ -10,8 +10,8 @@ cleanup() {
|
||||
|
||||
EXPECTED_VERSION="v12.3.456"
|
||||
URL="https://github.com/nvm-sh/nvm/releases/tag/$EXPECTED_VERSION"
|
||||
EXPECTED_CURL_ARGS="--compressed -q -w %{url_effective}\n -L -s -S http://latest.nvm.sh -o /dev/null"
|
||||
EXPECTED_WGET_ARGS="-q http://latest.nvm.sh --server-response -O /dev/null"
|
||||
EXPECTED_CURL_ARGS="--compressed -q -w %{url_effective}\n -L -s -S https://latest.nvm.sh -o /dev/null"
|
||||
EXPECTED_WGET_ARGS="-q https://latest.nvm.sh --server-response -O /dev/null"
|
||||
|
||||
curl() {
|
||||
if [ $# -eq 1 ] && [ "$1" = "-V" ]; then
|
||||
|
@@ -17,7 +17,7 @@ wget() {
|
||||
|
||||
OUTPUT="$(nvm_get_latest 2>&1)"
|
||||
EXIT_CODE="$(nvm_get_latest >/dev/null 2>&1 ; echo $?)"
|
||||
[ "_$OUTPUT" = "_http://latest.nvm.sh did not redirect to the latest release on GitHub" ] \
|
||||
[ "_$OUTPUT" = "_https://latest.nvm.sh did not redirect to the latest release on GitHub" ] \
|
||||
|| die "failed redirect did not report correct error message, got '$OUTPUT'"
|
||||
[ "_$EXIT_CODE" = "_2" ] \
|
||||
|| die "failed redirect did not exit with code 2, got $EXIT_CODE"
|
||||
|
Reference in New Issue
Block a user