Skip to content
Myr

[patch] HTTP -> HTTPS

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jordan Harband · committed by Jordan Harband · parent 6cfaede · Browse files · 3 files+6 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+6 added−6 removed

  • tests:+3 added−3 removed
  • other:+3 added−3 removed

3 files+6 added−6 removed

modified:test/slow/nvm_get_latest/nvm_get_latest+2 added-2 removed
8 unmodified lines
9\. ../../../nvm.sh1011EXPECTED_VERSION="v12.3.456"12URL="https://github.com/nvm-sh/nvm/releases/tag/$EXPECTED_VERSION"13EXPECTED_CURL_ARGS="--compressed -q -w %{url_effective}\n -L -s -S http://latest.nvm.sh -o /dev/null"14EXPECTED_WGET_ARGS="-q http://latest.nvm.sh --server-response -O /dev/null"13EXPECTED_CURL_ARGS="--compressed -q -w %{url_effective}\n -L -s -S https://latest.nvm.sh -o /dev/null"14EXPECTED_WGET_ARGS="-q https://latest.nvm.sh --server-response -O /dev/null"1516curl() {17 if [ $# -eq 1 ] && [ "$1" = "-V" ]; then18 echo "
83 unmodified lines
modified:test/slow/nvm_get_latest/nvm_get_latest failed redirect+1 added-1 removed
15 unmodified lines
16}1718OUTPUT="$(nvm_get_latest 2>&1)"19EXIT_CODE="$(nvm_get_latest >/dev/null 2>&1 ; echo $?)"20[ "_$OUTPUT" = "_http://latest.nvm.sh did not redirect to the latest release on GitHub" ] \20[ "_$OUTPUT" = "_https://latest.nvm.sh did not redirect to the latest release on GitHub" ] \21 || die "failed redirect did not report correct error message, got '$OUTPUT'"22[ "_$EXIT_CODE" = "_2" ] \23 || die "failed redirect did not exit with code 2, got $EXIT_CODE"24
1 unmodified line
modified:nvm.sh+3 added-3 removed
99 unmodified lines
100 if nvm_has "curl"; then101 if nvm_curl_use_compression; then102 CURL_COMPRESSED_FLAG="--compressed"103 fi104 NVM_LATEST_URL="$(curl ${CURL_COMPRESSED_FLAG:-} -q -w "%{url_effective}\\n" -L -s -S http://latest.nvm.sh -o /dev/null)"104 NVM_LATEST_URL="$(curl ${CURL_COMPRESSED_FLAG:-} -q -w "%{url_effective}\\n" -L -s -S https://latest.nvm.sh -o /dev/null)"105 elif nvm_has "wget"; then106 NVM_LATEST_URL="$(wget -q http://latest.nvm.sh --server-response -O /dev/null 2>&1 | command awk '/^ Location: /{DEST=$2} END{ print DEST }')"106 NVM_LATEST_URL="$(wget -q https://latest.nvm.sh --server-response -O /dev/null 2>&1 | command awk '/^ Location: /{DEST=$2} END{ print DEST }')"107 else108 nvm_err 'nvm needs curl or wget to proceed.'109 return 1110 fi111 if [ -z "${NVM_LATEST_URL}" ]; then112 nvm_err "http://latest.nvm.sh did not redirect to the latest release on GitHub"112 nvm_err "https://latest.nvm.sh did not redirect to the latest release on GitHub"113 return 2114 fi115 nvm_echo "${NVM_LATEST_URL##*/}"116}
4237 unmodified lines