[Refactor] `nvm_install_binary`: remove unused `nvm_get_mirror` call

Jordan Harband 2016-09-15 21:40:44 -07:00
parent 63fe22d635
commit dca0220275
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
1 changed files with 5 additions and 8 deletions

13
nvm.sh
View File

@ -1487,7 +1487,7 @@ nvm_get_mirror() {
esac
}
# args: flavor, kind, version, reinstall
# args: flavor, type, version, reinstall
nvm_install_binary() {
local FLAVOR
case "${1-}" in
@ -1498,11 +1498,8 @@ nvm_install_binary() {
;;
esac
local MIRROR
MIRROR="$(nvm_get_mirror node "${2-}")"
if [ -z "${MIRROR}" ]; then
return 3
fi
local TYPE
TYPE="${2-}"
local PREFIXED_VERSION
PREFIXED_VERSION="${3-}"
@ -1525,7 +1522,7 @@ nvm_install_binary() {
local TMPDIR
local VERSION_PATH
TARBALL="$(nvm_download_artifact "${FLAVOR}" binary std "${VERSION}" | command tail -1)"
TARBALL="$(nvm_download_artifact "${FLAVOR}" binary "${TYPE-}" "${VERSION}" | command tail -1)"
if [ -f "${TARBALL}" ]; then
TMPDIR="$(dirname "${TARBALL}")/files"
fi
@ -1569,7 +1566,7 @@ nvm_get_download_slug() {
esac
local VERSION
VERSION="${3}"
VERSION="${3-}"
local NVM_OS
NVM_OS="$(nvm_get_os)"