Compare commits
3 Commits
xcode-sele
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
39d9a42c35 | |
|
|
2c0c34f10e | |
|
|
c2f740ab38 |
|
|
@ -203,7 +203,7 @@ If you're running a system without prepackaged binary available, which means you
|
||||||
|
|
||||||
**Note:** On OS X, if you do not have Xcode installed and you do not wish to download the ~4.3GB file, you can install the `Command Line Tools`. You can check out this blog post on how to just that:
|
**Note:** On OS X, if you do not have Xcode installed and you do not wish to download the ~4.3GB file, you can install the `Command Line Tools`. You can check out this blog post on how to just that:
|
||||||
|
|
||||||
- [How to Install Command Line Tools in OS X Mavericks & Yosemite (Without Xcode)](http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/)
|
- [How to Install Command Line Tools in OS X Mavericks & Yosemite (Without Xcode)](https://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/)
|
||||||
|
|
||||||
**Note:** On OS X, if you have/had a "system" node installed and want to install modules globally, keep in mind that:
|
**Note:** On OS X, if you have/had a "system" node installed and want to install modules globally, keep in mind that:
|
||||||
|
|
||||||
|
|
@ -890,7 +890,7 @@ To change the user directory and/or account name follow the instructions [here](
|
||||||
[3]: https://travis-ci.org/nvm-sh/nvm
|
[3]: https://travis-ci.org/nvm-sh/nvm
|
||||||
[4]: https://github.com/nvm-sh/nvm/releases/tag/v0.39.1
|
[4]: https://github.com/nvm-sh/nvm/releases/tag/v0.39.1
|
||||||
[Urchin]: https://github.com/scraperwiki/urchin
|
[Urchin]: https://github.com/scraperwiki/urchin
|
||||||
[Fish]: http://fishshell.com
|
[Fish]: https://fishshell.com
|
||||||
|
|
||||||
**Homebrew makes zsh directories unsecure**
|
**Homebrew makes zsh directories unsecure**
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,12 @@ nvm_echo() {
|
||||||
command printf %s\\n "$*" 2>/dev/null
|
command printf %s\\n "$*" 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ -z "${BASH_VERSION}" ] || [ -n "${ZSH_VERSION}" ]; then
|
||||||
|
# shellcheck disable=SC2016
|
||||||
|
nvm_echo >&2 'Error: the install instructions explicitly say to pipe the install script to `bash`; please follow them'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
nvm_grep() {
|
nvm_grep() {
|
||||||
GREP_OPTIONS='' command grep "$@"
|
GREP_OPTIONS='' command grep "$@"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
6
nvm.sh
6
nvm.sh
|
|
@ -101,15 +101,15 @@ nvm_get_latest() {
|
||||||
if nvm_curl_use_compression; then
|
if nvm_curl_use_compression; then
|
||||||
CURL_COMPRESSED_FLAG="--compressed"
|
CURL_COMPRESSED_FLAG="--compressed"
|
||||||
fi
|
fi
|
||||||
NVM_LATEST_URL="$(curl ${CURL_COMPRESSED_FLAG:-} -q -w "%{url_effective}\\n" -L -s -S http://latest.nvm.sh -o /dev/null)"
|
NVM_LATEST_URL="$(curl ${CURL_COMPRESSED_FLAG:-} -q -w "%{url_effective}\\n" -L -s -S https://latest.nvm.sh -o /dev/null)"
|
||||||
elif nvm_has "wget"; then
|
elif nvm_has "wget"; then
|
||||||
NVM_LATEST_URL="$(wget -q http://latest.nvm.sh --server-response -O /dev/null 2>&1 | command awk '/^ Location: /{DEST=$2} END{ print DEST }')"
|
NVM_LATEST_URL="$(wget -q https://latest.nvm.sh --server-response -O /dev/null 2>&1 | command awk '/^ Location: /{DEST=$2} END{ print DEST }')"
|
||||||
else
|
else
|
||||||
nvm_err 'nvm needs curl or wget to proceed.'
|
nvm_err 'nvm needs curl or wget to proceed.'
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
if [ -z "${NVM_LATEST_URL}" ]; then
|
if [ -z "${NVM_LATEST_URL}" ]; then
|
||||||
nvm_err "http://latest.nvm.sh did not redirect to the latest release on GitHub"
|
nvm_err "https://latest.nvm.sh did not redirect to the latest release on GitHub"
|
||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
nvm_echo "${NVM_LATEST_URL##*/}"
|
nvm_echo "${NVM_LATEST_URL##*/}"
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ cleanup() {
|
||||||
|
|
||||||
EXPECTED_VERSION="v12.3.456"
|
EXPECTED_VERSION="v12.3.456"
|
||||||
URL="https://github.com/nvm-sh/nvm/releases/tag/$EXPECTED_VERSION"
|
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_CURL_ARGS="--compressed -q -w %{url_effective}\n -L -s -S https://latest.nvm.sh -o /dev/null"
|
||||||
EXPECTED_WGET_ARGS="-q http://latest.nvm.sh --server-response -O /dev/null"
|
EXPECTED_WGET_ARGS="-q https://latest.nvm.sh --server-response -O /dev/null"
|
||||||
|
|
||||||
curl() {
|
curl() {
|
||||||
if [ $# -eq 1 ] && [ "$1" = "-V" ]; then
|
if [ $# -eq 1 ] && [ "$1" = "-V" ]; then
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ wget() {
|
||||||
|
|
||||||
OUTPUT="$(nvm_get_latest 2>&1)"
|
OUTPUT="$(nvm_get_latest 2>&1)"
|
||||||
EXIT_CODE="$(nvm_get_latest >/dev/null 2>&1 ; echo $?)"
|
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'"
|
|| die "failed redirect did not report correct error message, got '$OUTPUT'"
|
||||||
[ "_$EXIT_CODE" = "_2" ] \
|
[ "_$EXIT_CODE" = "_2" ] \
|
||||||
|| die "failed redirect did not exit with code 2, got $EXIT_CODE"
|
|| die "failed redirect did not exit with code 2, got $EXIT_CODE"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue