mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-11-21 00:32:53 +03:00
`nvm install --lts` and `nvm install node` resolve to whatever is newest on nodejs.org, so a partial release (eg, v26.13.0, published to `index.tab` before its `SHASUMS256.txt`) these tests fail without any change to nvm. `nvm exec --lts` and `nvm run --lts` now run against v18.20.8, with `lts/*` pointed at `lts/hydrogen` after setup's installs (which rewrite the LTS aliases), and restored in teardown. The `set -E` test now installs `9`, which still resolves remotely, since the ERR trap handling it covers is in `nvm()` itself. See https://github.com/nodejs/node/issues/67087
15 lines
344 B
Bash
Executable File
15 lines
344 B
Bash
Executable File
#!/bin/sh
|
|
|
|
\. ../../../nvm.sh
|
|
nvm install 0.10.7
|
|
nvm install 1.0.0
|
|
nvm install 18.20.8
|
|
|
|
# pin `lts/*` to an end-of-life LTS line, so that a new LTS release can't change what `--lts` selects
|
|
cp "$(nvm_alias_path)/lts/*" "${NVM_DIR}/.nvm_exec_lts_alias_bak"
|
|
nvm_make_alias 'lts/*' lts/hydrogen
|
|
|
|
if [ -f ".nvmrc" ]; then
|
|
mv .nvmrc .nvmrc.bak
|
|
fi
|