Allow empty or unset NVM_SOURCE in nvm_source()

This commit is contained in:
immeëmosol 2022-05-11 14:14:27 +02:00 committed by GitHub
parent ef3b20c21e
commit e70ad7e90f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,7 @@ nvm_source() {
local NVM_METHOD
NVM_METHOD="$1"
local NVM_SOURCE_URL
NVM_SOURCE_URL="$NVM_SOURCE"
NVM_SOURCE_URL="${NVM_SOURCE-}"
if [ "_$NVM_METHOD" = "_script-nvm-exec" ]; then
NVM_SOURCE_URL="https://raw.githubusercontent.com/${NVM_GITHUB_REPO}/${NVM_VERSION}/nvm-exec"
elif [ "_$NVM_METHOD" = "_script-nvm-bash-completion" ]; then