Compare commits

..

2 Commits

Author SHA1 Message Date
David Welch
8fcd4ab6d6
[New] Add support for NVM_AUTH_HEADER env var
Closes #3366

Co-authored-by: David Welch <david@davidwelch.co>
Co-authored-by: Andre Kradolfer <narfdre@gmail.com>
2024-06-21 08:55:22 -06:00
Jordan Harband
762f9ef9d1
[Tests] only install python 2.7 if not already installed
See ee6f7667 / #3067
2024-07-06 10:29:55 -05:00
3 changed files with 4 additions and 8 deletions

View File

@ -32,7 +32,7 @@ before_install:
- zsh --version - zsh --version
- dpkg -s dash | grep ^Version | awk '{print $2}' - dpkg -s dash | grep ^Version | awk '{print $2}'
# install python # install python
- pyenv install 2.7.18 - pyenv local 2.7.18 || pyenv install 2.7.18
- pyenv local 2.7.18 || echo 'pyenv failed' - pyenv local 2.7.18 || echo 'pyenv failed'
- python -V - python -V
install: install:

View File

@ -535,11 +535,7 @@ NVM_IOJS_ORG_MIRROR=https://iojs.org/dist nvm install iojs-v1.0.3
To pass an Authorization header through to the mirror url, set `$NVM_AUTH_HEADER` To pass an Authorization header through to the mirror url, set `$NVM_AUTH_HEADER`
```sh ```sh
export NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist NVM_AUTH_HEADER="Bearer secret-token" nvm install node
export NVM_AUTH_HEADER="Bearer secret-token"
nvm install node
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist NVM_AUTH_HEADER="Bearer secret-token" nvm install 4.2
``` ```
### .nvmrc ### .nvmrc

4
nvm.sh
View File

@ -141,8 +141,8 @@ nvm_download() {
-e 's/-o /-O /' \ -e 's/-o /-O /' \
-e 's/-C - /-c /') -e 's/-C - /-c /')
if [ -n "$NVM_AUTH_HEADER" ]; then if [ -n "${NVM_AUTH_HEADER:-}" ]; then
ARGS="$ARGS --header \"$NVM_AUTH_HEADER\"" ARGS="${ARGS} --header \"${NVM_AUTH_HEADER}\""
fi fi
# shellcheck disable=SC2086 # shellcheck disable=SC2086
eval wget $ARGS eval wget $ARGS