Compare commits

..

3 Commits

Author SHA1 Message Date
David Welch
7e73d634b1
Merge 79737fe6bb1d08ae452187a53459c5776f4a884a into e597bb208efe942f30139df88b5ef74e78c15925 2024-07-05 22:17:26 +00:00
Andre Kradolfer
79737fe6bb
adding bash to docker 2024-07-05 16:17:15 -06:00
David Welch
78e9f45878
[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 8 additions and 4 deletions

View File

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

View File

@ -535,7 +535,11 @@ 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
NVM_AUTH_HEADER="Bearer secret-token" nvm install node
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
```
### .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