Skip to content

Commit 8b527a7

Browse files
authored
Update install.sh
1 parent 4c78882 commit 8b527a7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/node/install.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export NVM_VERSION="${NVMVERSION:-"latest"}"
1313
export NVM_DIR="${NVMINSTALLPATH:-"/usr/local/share/nvm"}"
1414
export NVM_NODEJS_ORG_MIRROR="${NVM_NODEJS_ORG_MIRROR:-https://nodejs.org/dist}"
1515
NVM_NODEJS_ORG_MIRROR_ESCAPED="$(printf '%q' "${NVM_NODEJS_ORG_MIRROR}")"
16+
GITHUB_USERCONTENT_URL="${GITHUB_USERCONTENT_MIRROR:-https://raw.githubusercontent.com}"
1617
INSTALL_TOOLS_FOR_NODE_GYP="${NODEGYPDEPENDENCIES:-true}"
1718
export INSTALL_YARN_USING_APT="${INSTALLYARNUSINGAPT:-false}" # only concerns Debian-based systems
1819

@@ -308,9 +309,9 @@ umask 0002
308309
# Do not update profile - we'll do this manually
309310
export PROFILE=/dev/null
310311
export NVM_NODEJS_ORG_MIRROR="${NVM_NODEJS_ORG_MIRROR}"
311-
curl -so- "https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh" | bash || {
312+
curl -so- "${GITHUB_USERCONTENT_URL}/nvm-sh/nvm/v${NVM_VERSION}/install.sh" | bash || {
312313
PREV_NVM_VERSION=$(curl -s https://api.github.com/repos/nvm-sh/nvm/releases/latest | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/')
313-
curl -so- "https://raw.githubusercontent.com/nvm-sh/nvm/\${PREV_NVM_VERSION}/install.sh" | bash
314+
curl -so- "${GITHUB_USERCONTENT_URL}/nvm-sh/nvm/\${PREV_NVM_VERSION}/install.sh" | bash
314315
NVM_VERSION="\${PREV_NVM_VERSION}"
315316
}
316317
[ -s "${NVM_DIR}/nvm.sh" ] && source "${NVM_DIR}/nvm.sh"

0 commit comments

Comments
 (0)