Compare commits

..

3 Commits

Author SHA1 Message Date
David Welch
ff7f2cb026
Merge 8fcd4ab6d663cda95e700931847558dc724b97ab into 762f9ef9d17623b45095e8ca1a996c8928f3f424 2024-07-06 19:14:01 +00: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
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
3 changed files with 4 additions and 8 deletions

View File

@ -32,7 +32,7 @@ before_install:
- zsh --version
- dpkg -s dash | grep ^Version | awk '{print $2}'
# 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'
- python -V
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`
```sh
export NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist
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
NVM_AUTH_HEADER="Bearer secret-token" nvm install node
```
### .nvmrc

4
nvm.sh
View File

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