mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-11-12 00:00:00 +08:00
1f99e4c20bb92c5737b92512446acf8e303b1edd
2516
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
1f99e4c20b |
[Fix] nvm_download_artifact: only put an archive in the cache once its checksum has passed
`nvm install --offline` installs whatever archive sits at the cache path without checking it again, which is only safe if everything nvm writes there has been verified. When a download failed its checksum, `nvm_download_artifact` removed only the empty `files` directory and left the rejected archive in `$NVM_DIR/.cache`, so a later `nvm install --offline` would install the very tarball the online install had just refused. An interrupted download was also left at the final cache name. Download to a temporary `.unverified` name instead, run the 404 and checksum checks on that file, and move it to the cache path only once the checksum has passed. Every failure path, including a checksum mismatch or a missing expected checksum, now removes the temporary file and the version's cache directory, so `--offline` no longer finds the version at all. The README's offline section now says that only verified downloads are cached and that `--offline` trusts the cache as-is. Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-7NCT51FE. |
||
|
|
aa0572b7c4 |
[Fix] nvm_normalize_lts, nvm_ls_remote_index_tab: keep untrusted text out of shell arithmetic and LTS aliases
`nvm_normalize_lts` matched `lts/-N` with a glob that only pins the first digit after `lts/-`, then evaluated the rest inside `$((N+1))`. bash and zsh evaluate a variable's contents as an arithmetic expression there, including command substitutions in array subscripts, so a name like `lts/-10*path[$(cmd)1]` ran `cmd`. Such a name reaches this function from `nvm alias`, `nvm use`, `nvm install`, and `.nvmrc`, and also from LTS alias files written from a mirror's `index.tab`, which are resolved whenever `lts/*` or that codename is used. The version column of a mirror's `index.tab` was used verbatim: printed by `nvm ls-remote` and `nvm version-remote`, matched against patterns, and stored as the target of `lts/*` codename aliases. A hostile or compromised mirror could thus persist such a payload into `$NVM_DIR/alias/lts/`, where it is replayed later by `nvm alias` and alias resolution without the mirror being involved, and could put terminal escape sequences on the user's screen. `nvm_normalize_lts` now takes everything after `lts/-` with parameter expansion and passes the name through unchanged unless it is all digits, before any arithmetic happens. `lts/-1` through `lts/-N`, and the error when there are not that many LTS lines, behave as before; malformed offsets like `lts/-1x` or `lts/-10+1` are now returned unchanged in every shell, instead of erroring in dash or being evaluated in bash and zsh. This also drops the `$?` check after the arithmetic, which could never fire. `nvm_ls_remote_index_tab` now skips the header and keeps only rows whose version is `vX.Y.Z`, optionally followed by a `-` prerelease suffix of letters, digits, `.` and `-`, before anything is printed, stored, or matched. The check runs on the raw column, before the `iojs-` prefix is added. Every row of the current nodejs.org, nodejs.org nightly, and iojs.org index files passes, including `rc`, `nightly`, and `v8-canary` versions. Discovered by Anthropic's OSS Scanner, as vulnerabilities ANT-2026-0GXXE91V and ANT-2026-31ZIEY85. |
||
|
|
6131a266a4 |
[Fix] nvm install: keep nvm options after the version out of ./configure
Options after the version went to `./configure` for a source install and were ignored for a binary install. `--latest-npm`, `--default`, `--alias`, `--save` and `--no-progress` now also work after the version, like `--reinstall-packages-from` already does. `-s`, `-b`, `-j`, `--offline` and `--lts` are checked, or used to find the version, before it is resolved: after the version they now fail right away with a message to put them first, and so do `---` typos. Fixes #2066. |
||
|
|
d190476345 |
[Fix] nvm install: apply --alias, --default and --save after every install
`nvm_install_binary` set the alias from its caller's variables, so a source install or an `$NVM_INSTALL_THIRD_PARTY_HOOK` install never got it, and no fresh install wrote `.nvmrc`. Apply both at the end of `nvm install`, after the install is validated. `--lts` without a version, or `lts/*`, leaves no provided version, and `nvm alias` treats an empty target as `nvm unalias`: `nvm install --lts --default` on an installed version removed the default alias. In that case point the alias at `lts/<name>`, as the default alias already is. |
||
|
|
00cc205d6f |
[Fix] nvm install: don't leave NVM_NO_PROGRESS set in the caller's shell
`nvm install` passed the progress setting to `nvm_install_binary` and `nvm_install_source` as a prefix assignment, which bash 3.2 in POSIX mode (macOS's `sh`) keeps after a function call returns, so one install left `NVM_NO_PROGRESS=0` set, and every later `nvm install --no-progress` was ignored. Set it as a local instead. |
||
|
|
17270cd532 |
[Perf] nvm_print_implicit_alias: classify implicit aliases in one awk pass
To resolve `stable` and `unstable`, `nvm_print_implicit_alias` started an awk process per installed minor version, plus another per pre-1.0 one to check its parity. Classify the whole list in a single awk pass instead, and skip it when there is nothing to classify. The results are unchanged. Refs #3416. Refs #3811. |
||
|
|
84b176d46d |
[Fix] nvm_get_default_packages: ignore CRLF line endings
A `default-packages` file saved with Windows line endings left a carriage return on every package name, and turned each blank line into a lone `\r` entry, so `npm install -g` was given `rimraf\r` and failed. Strip a trailing `\r` from each line before parsing it, like `.nvmrc` parsing already tolerates. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Wei-Lun Li <b84330808@gmail.com> |
||
|
|
edde7ce995 |
[Refactor] install.sh: check profile lines through one comment-aware helper
`nvm_do_install` checked for its `nvm.sh` and `bash_completion` source lines with two separate regexes that each had to skip commented-out lines. Move that into `nvm_profile_has_line`, which strips whole-line comments before matching, and test the `bash_completion` line and an already set up profile too. |
||
|
|
db03e5e1c3 |
[Fix] install.sh: ignore commented-out profile source lines
`nvm_do_install` decided whether the profile already loads nvm, and its bash completion, by grepping for `/nvm.sh` and `$NVM_DIR/bash_completion` anywhere in it, so a commented-out line, the usual way to disable nvm, counted as present, and reinstalling left the shell with no nvm. Only count a line whose first non-blank character isn't `#`. Fixes #1889. Signed-off-by: Vaibhav Cheruvu <vaibhavsharma.c@gmail.com> Co-authored-by: Vaibhav Cheruvu <vaibhavsharma.c@gmail.com> Co-authored-by: Jordan Harband <ljharb@gmail.com> |
||
|
|
7ab48a653b |
[Fix] nvm_print_implicit_alias: keep STABLE bound, and STABLE and UNSTABLE independent of the caller
`STABLE` is only assigned inside the loop over `LAST_TWO`,
but it is echoed unconditionally afterwards.
With nothing installed, or with only an odd minor,
the loop never runs, so under `set -u` `nvm ls` dies on
`STABLE: unbound variable` instead of resolving `stable` to nothing.
`local STABLE` without an initializer also keeps the caller's value in sh and dash,
so `STABLE=x nvm ls stable` resolves the alias to something that isn't installed.
Initializing it where it is declared fixes both,
the way
|
||
|
|
c8dc8c9b1c |
[Fix] nvm_ls: treat a version dir with only hidden entries as empty
`nvm_ls` decides whether a version dir is worth searching with `ls -1qA`, which
also counts dotfiles, but then collects versions with `find "${DIR}"/*`, which
never matches them. A dir holding nothing but hidden entries passes the guard,
so when `nullglob` is not set `find` is handed the literal `*` and `nvm ls`
prints "No such file or directory" to stderr.
Drop `-A` from the guard so both halves agree on what counts as an entry.
Fixes #3727.
|
||
|
|
c6bf252f7d |
[Fix] ls: list versions whose directory is a symlink
nvm_ls collects installed versions with `find <dirs>/* -name . -o -type d -prune -o -path ...`, and `-type d` is false for a symlink, so a version dir that links to another volume was skipped from the listing entirely - while `nvm version`, `nvm which` and `nvm use` all kept working on it. Have that find follow symlinks, which makes linked-in versions visible and still ignores a broken link. Fixes #617. |
||
|
|
970ed9ea18 |
[Fix] nvm_die_on_prefix: check a nonexistent prefix on Windows
On Windows, `npm_config_prefix` is resolved with `cd` + `pwd` so it can be compared with `$NVM_DIR`. When the directory does not exist yet, that resolution fails, the value becomes empty, and the check is skipped. Keep the value as given in that case, like on other systems. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Wei-Lun Li <b84330808@gmail.com> |
||
|
|
c7a1b344da |
[Fix] install.sh: only write $HOME when $NVM_DIR is inside it
The profile line was built by replacing a leading `$HOME` with `sed`, without a path boundary, and with `$HOME` treated as a regex. With `HOME=/home/me` and `NVM_DIR=/home/me2/nvm`, or with `HOME=/` and `NVM_DIR=/usr/local/nvm`, the profile got `export NVM_DIR="$HOME2/nvm"` or `export NVM_DIR="$HOMEusr/local/nvm"`, which expand to the wrong directory, so nvm does not load in new shells. A `.` in `$HOME` matched any character, a `:` in it broke the `sed` expression, and a trailing slash on it left `$HOME.nvm`. Match `$HOME` literally, as a whole path component, and leave the path absolute when `$HOME` is empty. |
||
|
|
93da6595ce |
[Fix] nvm_is_version_or_alias: reject uppercase LTS names in every locale
bash 3.2, macOS's `/bin/sh`, matches a bracket range like `[a-z]` by collation order in a UTF-8 locale, which interleaves upper- and lowercase letters, so `lts/Iron` from a symlinked `.nvmrc` was accepted there. Match with `[:lower:]` instead. |
||
|
|
67268ebcb6 |
[Fix] nvm_process_nvmrc: don't show the content of a symlinked .nvmrc
`.nvmrc` is found and read through symlinks, so a repository that commits `.nvmrc` as a symlink to a path outside itself (eg, `../../.npmrc`) made a plain `nvm use`, `nvm install`, or `nvm which` (or `nvm-exec`, or the README's auto-switching shell hook) print that file: the invalid `.nvmrc` message shows everything that was parsed, even with `--silent`, and a one-line file was taken as the version, which is printed in the "Found" message and in later errors. A symlinked `.nvmrc` is still followed, so linking to another version file (eg, `.node-version`, or a parent directory's `.nvmrc`) keeps working, but its content is never shown, and it is valid only if it names a version or an existing alias, via a new `nvm_is_version_or_alias` helper. |
||
|
|
3f8411e58d |
[Fix] nvm_write_nvmrc: don't write through a symlinked .nvmrc
`nvm use --save` and `nvm install --save` wrote the version to `$PWD/.nvmrc` with `tee`, which follows a symlink, so a repository that commits `.nvmrc` as a symlink to a path outside itself made `--save` truncate any file the user can write (eg, a shell startup file or `~/.ssh/authorized_keys`) and replace it with the version string, or create the target of a dangling link. The link itself was left in place, so `git status` stayed clean. `nvm_write_nvmrc` now refuses, with a warning, when `.nvmrc` in the current directory is a symlink, dangling or not. |
||
|
|
03f74a8666 |
[Fix] nvm_ls: match NVM_DIR literally
`nvm_ls` strips `$NVM_DIR` and the io.js version dir from each installed version's path with sed, but put both into the regex as-is, so an `NVM_DIR` containing a backslash, `[`, or `*` listed no installed versions, and one containing `#` made sed fail. Escape both before use, as `SEARCH_PATTERN` already is. |
||
|
|
bfabdbc278 |
[Fix] nvm use: do not pile up PATH entries in nested sessions
`nvm_change_path` prepends the new version (instead of replacing the existing nvm path) when a system bin dir precedes an nvm path, to handle macOS `path_helper` reordering the `PATH` of nested sessions (#1652). However, the check matched a system dir followed by *any* nvm path. Once a stale nvm path sits after the system dirs (e.g. inherited by a nested shell, tmux, or an editor's terminal), the check stays true forever, so every `nvm use` prepends yet another entry and the previously used version is never removed from the `PATH`. Only consider the first nvm path: if it is not preceded by a system bin dir, replace it in place as usual. Fixes #3561 |
||
|
|
799de1d2dc |
[actions] TOC: use node/install instead of setup-node
`lts/*` is now node 26, which is not in the runner's tool cache, so `setup-node` downloads it from a GitHub release asset host that the harden-runner allowlist blocks. `node/install` installs node with nvm from nodejs.org, like the other workflows. |
||
|
|
16df5aa69a |
[Fix] nvm_filter_installed_versions, nvm_filter_lts_versions, nvm_record_lts_status, nvm_get_default_packages: keep backslashes in NVM_DIR paths
These passed a path under `$NVM_DIR` to awk with `-v`, which processes backslash escapes, so with a backslash in `NVM_DIR` awk opened the wrong file: the LTS status record read as empty, so `nvm_filter_installed_versions` treated every version as non-LTS and `nvm_filter_lts_versions` matched none, `nvm_record_lts_status` could not merge an index without LTS versions into the record, and `nvm_get_default_packages` named the wrong file in its error. The LTS functions now pass the path through the environment, like `nvm_strip_path` and `nvm_replace_literal`; `nvm_get_default_packages` uses awk's `FILENAME`, which is taken literally. |
||
|
|
8486d07a5e |
[Fix] nvm_strip_path: preserve literal backslashes in NVM_DIR
|
||
|
|
5e38bc0cae |
[Tests] pin --lts and node installs to end-of-life lines, so a new node release can't break them
Code scanning - action / CodeQL-Build (push) Failing after 1m33s
Tests: linting / doctoc (push) Successful in 10m52s
Tests: xenial / xenial (dash) (push) Failing after 32s
Tests: shellcheck / shellcheck_matrix (bash_completion, bash) (push) Failing after 4m16s
Tests: shellcheck / shellcheck_matrix (nvm.sh, ksh) (push) Failing after 32s
Tests: alpine / fast x64 (alpine 3, bash) (push) Failing after 33s
Tests: alpine / fast x64 (alpine 3, dash) (push) Failing after 33s
Tests: alpine / fast x64 (alpine 3, sh) (push) Failing after 1m34s
Tests: alpine / fast x64 (alpine 3.15, dash) (push) Failing after 17m17s
Tests: release process / release (push) Successful in 1m49s
Tests: alpine / fast x64 (alpine 3.19, zsh) (push) Failing after 32s
Tests: alpine / musl-binary x64 (alpine 3.15, node v14.21.3) (push) Failing after 1m35s
Tests: alpine / musl-binary x64 (alpine 3.20, node v20.18.1) (push) Failing after 33s
Tests: fast / fast (dash, gawk) (push) Failing after 33s
Tests: fast / fast (sh, gawk) (push) Failing after 33s
Tests: fast / fast (zsh, gawk) (push) Failing after 3h1m5s
Tests: fast / fast (bash, mawk) (push) Failing after 1m32s
Tests: installation_iojs / installation_iojs without curl (bash) (push) Failing after 1m33s
Tests: installation_iojs / installation_iojs without curl (sh) (push) Successful in 9m35s
Tests: installation_iojs / installation_iojs without curl (dash) (push) Failing after 6m56s
Tests: installation_node / installation_node (dash, without curl) (push) Failing after 1m51s
Tests: installation_node / installation_node (sh) (push) Failing after 32s
Tests: installation_node / installation_node (sh, without curl) (push) Failing after 33s
Tests: installation_node / installation_node (zsh) (push) Failing after 34s
urchin tests / tests (bash, install_script) (push) Failing after 34s
Tests: xenial / all xenial tests (push) Skipped
urchin tests / tests (dash, sourcing) (push) Failing after 33s
urchin tests / tests (sh, sourcing) (push) Failing after 32s
urchin tests / tests (zsh, sourcing) (push) Failing after 2m58s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (0.10) (push) Failing after 2m33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (0.12) (push) Successful in 8m51s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (16) (push) Failing after 38s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (17) (push) Failing after 33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (19) (push) Failing after 34s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (2) (push) Failing after 35s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (20) (push) Successful in 1m17s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (26) (push) Failing after 34s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (3) (push) Failing after 26m11s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (5) (push) Failing after 32s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (8) (push) Failing after 32s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (9) (push) Failing after 33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (9.0) (push) Failing after 32s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (9.1) (push) Failing after 32s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (push) Skipped
Tests: nvm install with set -e / test (no nvmrc, HEAD, 2 shlvls) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.39.3, 2 shlvls) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.39.4, 1 shlvl) (push) Failing after 1m33s
Tests: nvm install with set -e / test (no nvmrc, v0.39.5, 1 shlvl) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.39.6, 1 shlvl) (push) Failing after 5m8s
Tests: nvm install with set -e / test (no nvmrc, v0.39.6, 2 shlvls) (push) Failing after 14s
Tests: nvm install with set -e / test (no nvmrc, v0.39.7, 2 shlvls) (push) Failing after 21s
Tests: nvm install with set -e / test (no nvmrc, v0.40.3, 1 shlvl) (push) Failing after 13s
Tests: nvm install with set -e / test (no nvmrc, v0.40.4, 1 shlvl) (push) Failing after 14s
Tests: nvm install with set -e / test (nvmrc, HEAD, 1 shlvl) (push) Failing after 16s
Tests: nvm install with set -e / test (nvmrc, v0.39.4, 1 shlvl) (push) Failing after 16s
Tests: nvm install with set -e / test (nvmrc, v0.39.6, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (no nvmrc, v0.40.4, 2 shlvls) (push) Failing after 13s
Tests: nvm install with set -e / test (no nvmrc, v0.40.5, 1 shlvl) (push) Failing after 5m46s
Tests: nvm install with set -e / test (no nvmrc, v0.40.5, 2 shlvls) (push) Failing after 3m26s
Tests: nvm install with set -e / test (no nvmrc, v0.40.7, 2 shlvls) (push) Failing after 14s
Tests: nvm install with set -e / test (no nvmrc, v0.40.8, 2 shlvls) (push) Failing after 16s
Tests: nvm install with set -e / test (nvmrc, v0.39.3, 1 shlvl) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, v0.39.7, 1 shlvl) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.40.1, 1 shlvl) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, v0.40.1, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.40.3, 1 shlvl) (push) Failing after 17s
Tests: nvm install with set -e / test (nvmrc, v0.40.5, 1 shlvl) (push) Failing after 17s
Tests: nvm install with set -e / test (nvmrc, v0.40.8, 2 shlvls) (push) Failing after 7m7s
Tests: nvm install with set -e / finisher (push) Skipped
Tests on Windows: `nvm install` / MSYS nvm install (--default 12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 14, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 21, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 10, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 10, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 12, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 14, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 16, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 18, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 21, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 21, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 21, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 21, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, --lts, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, --lts, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 18, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 21, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, --lts, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 11, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 16, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 14, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Alpine-3.23) (push) Canceled after 0s
Tests: fast / fast (macOS, bash) (push) Canceled after 0s
Tests: fast / fast (macOS, dash) (push) Canceled after 0s
Tests: fast / fast (macOS, zsh) (push) Canceled after 0s
Tests on Windows: `nvm install` / tests, on windows (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3, bash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.15, bash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, bash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, dash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, zsh) (push) Canceled after 0s
Tests: `nvm install-latest-npm` / matrix (push) Successful in 7m34s
Tests: linting / eclint (push) Failing after 2m50s
Tests: linting / all linting (push) Skipped
Tests: nvm install with set -e / matrix (push) Successful in 8s
Tests: shellcheck / shellcheck_matrix (nvm.sh, bash) (push) Failing after 33s
Tests: shellcheck / shellcheck_matrix (nvm.sh, dash) (push) Failing after 33s
Tests: alpine / fast x64 (alpine 3, zsh) (push) Failing after 6m46s
Tests: alpine / fast x64 (alpine 3.15, bash) (push) Failing after 5m47s
Tests: shellcheck / shellcheck_matrix (install.sh, bash) (push) Failing after 2m5s
Tests: shellcheck / shellcheck_matrix (nvm-exec, bash) (push) Failing after 32s
Tests: alpine / fast x64 (alpine 3.15, sh) (push) Failing after 17m39s
Tests: alpine / fast x64 (alpine 3.19, bash) (push) Failing after 15m49s
Tests: alpine / fast x64 (alpine 3.19, dash) (push) Failing after 1m32s
Tests: alpine / fast x64 (alpine 3.19, sh) (push) Failing after 1m32s
Tests: alpine / musl-binary x64 (alpine 3.10, node v10.24.1) (push) Failing after 32s
Tests: alpine / musl-binary x64 (alpine 3.10, node v8.17.0) (push) Failing after 34s
Tests: alpine / musl-binary x64 (alpine 3.12, node v12.22.12) (push) Failing after 32s
Tests: fast / fast (bash, gawk) (push) Failing after 32s
Tests: fast / fast (dash, mawk) (push) Failing after 32s
Tests: fast / fast (zsh, mawk) (push) Failing after 19m17s
Tests: installation_iojs / actually compile io.js from source (gcc 4.9 container) (push) Failing after 29s
Tests: installation_node / installation_node (dash) (push) Failing after 22m18s
Tests: xenial / xenial (bash) (push) Failing after 33s
Tests: xenial / xenial (sh) (push) Failing after 32s
Tests: xenial / xenial (zsh) (push) Failing after 1m40s
urchin tests / tests (bash, sourcing) (push) Failing after 1m32s
urchin tests / tests (dash, slow) (push) Failing after 32s
urchin tests / tests (sh, slow) (push) Failing after 33s
urchin tests / all test suites, all shells (push) Skipped
Tests: `nvm install-latest-npm` / nvm install-latest-npm (1) (push) Failing after 1m34s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (10) (push) Failing after 34s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (11) (push) Failing after 33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (12) (push) Failing after 33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (13) (push) Failing after 39s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (18) (push) Failing after 34s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (20.4) (push) Successful in 1m17s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (21) (push) Successful in 1m27s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (22) (push) Successful in 1m4s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (23) (push) Failing after 17m1s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (25) (push) Failing after 16m52s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (4) (push) Successful in 3m6s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (4.4) (push) Successful in 6m0s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (4.5) (push) Successful in 1m39s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (7) (push) Failing after 32s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (9.2) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, HEAD, 1 shlvl) (push) Failing after 1m32s
Tests: nvm install with set -e / test (no nvmrc, v0.39.4, 2 shlvls) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.39.3, 1 shlvl) (push) Failing after 33s
Tests: nvm install with set -e / test (no nvmrc, v0.39.7, 1 shlvl) (push) Failing after 7m2s
Tests: nvm install with set -e / test (no nvmrc, v0.40.0, 1 shlvl) (push) Failing after 15s
Tests: nvm install with set -e / test (no nvmrc, v0.40.0, 2 shlvls) (push) Failing after 16s
Tests: nvm install with set -e / test (no nvmrc, v0.40.1, 2 shlvls) (push) Failing after 13s
Tests: nvm install with set -e / test (no nvmrc, v0.40.2, 1 shlvl) (push) Failing after 14s
Tests: nvm install with set -e / test (no nvmrc, v0.40.2, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (no nvmrc, v0.40.8, 1 shlvl) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, HEAD, 2 shlvls) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, v0.39.6, 1 shlvl) (push) Failing after 13s
Tests: nvm install with set -e / test (no nvmrc, v0.40.3, 2 shlvls) (push) Failing after 16s
Tests: nvm install with set -e / test (nvmrc, v0.39.5, 1 shlvl) (push) Failing after 15s
Tests: nvm install with set -e / test (nvmrc, v0.39.7, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.40.2, 1 shlvl) (push) Failing after 14s
Tests: nvm install with set -e / test (nvmrc, v0.40.2, 2 shlvls) (push) Failing after 15s
Tests: nvm install with set -e / test (nvmrc, v0.40.3, 2 shlvls) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, v0.40.4, 1 shlvl) (push) Failing after 10m31s
Tests: nvm install with set -e / test (nvmrc, v0.40.4, 2 shlvls) (push) Failing after 24s
Tests: nvm install with set -e / test (nvmrc, v0.40.5, 2 shlvls) (push) Failing after 21s
Tests: nvm install with set -e / test (nvmrc, v0.40.6, 1 shlvl) (push) Failing after 21s
Tests: nvm install with set -e / test (nvmrc, v0.40.8, 1 shlvl) (push) Failing after 19s
Tests on Windows: `nvm install` / MSYS fail prefix nvm install (push) Canceled after 0s
Tests on Windows: `nvm install` / MSYS nvm install (--lts) (push) Canceled after 0s
Tests on Windows: `nvm install` / MSYS nvm install (--no-progress 10) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 18, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 18, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 18, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 21, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 21, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 10, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 10, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 12, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 12, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 12, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 14, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 14, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 14, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 14, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 16, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 18, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 11, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 11, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, --lts, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 11, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 12, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 14, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 14, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 18, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 21, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 21, Alpine-3.23) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.15, sh) (push) Canceled after 0s
Tests: fast / fast (WSL Ubuntu-24.04, bash) (push) Canceled after 0s
Tests: fast / fast (WSL Ubuntu-24.04, dash) (push) Canceled after 0s
Tests: fast / all fast tests (push) Canceled after 0s
Tests: linting / dockerfile_lint (push) Failing after 7m7s
Tests: linting / test_naming (push) Successful in 16s
Tests: linting / check_exec (push) Successful in 7m53s
Tests: shellcheck / shellcheck_matrix (nvm.sh, sh) (push) Failing after 32s
Tests: shellcheck / shellcheck (push) Skipped
Tests: alpine / fast x64 (alpine 3.15, zsh) (push) Failing after 16m49s
Tests: alpine / musl-binary x64 (alpine 3, node v22.12.0) (push) Failing after 33s
Tests: alpine / musl-binary x64 (alpine 3.16, node v16.20.2) (push) Failing after 1m33s
Tests: alpine / musl-binary x64 (alpine 3.18, node v18.20.4) (push) Failing after 33s
Tests: fast / fast (sh, mawk) (push) Failing after 7m3s
Tests: installation_iojs / installation_iojs without curl (zsh) (push) Failing after 6m54s
Tests: installation_iojs / all installation_iojs tests (push) Skipped
Tests: installation_node / installation_node (bash) (push) Failing after 15m50s
Tests: installation_node / installation_node (bash, without curl) (push) Failing after 22m35s
Tests: installation_node / installation_node (zsh, without curl) (push) Failing after 33s
Tests: installation_node / all installation_node tests (push) Skipped
urchin tests / tests (bash, installation_iojs) (push) Failing after 4m55s
urchin tests / tests (bash, slow) (push) Failing after 31m56s
urchin tests / tests (dash, installation_iojs) (push) Failing after 1m54s
urchin tests / tests (sh, installation_iojs) (push) Failing after 32s
urchin tests / tests (zsh, installation_iojs) (push) Failing after 32s
urchin tests / tests (zsh, slow) (push) Failing after 39m44s
update readme TOC / update readme TOC (push) Failing after 33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (14) (push) Failing after 32s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (14.16) (push) Failing after 17m6s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (14.17) (push) Failing after 1m33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (15) (push) Failing after 1m33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (20.5) (push) Successful in 1m10s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (24) (push) Successful in 7m40s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (4.6) (push) Successful in 2m39s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (5.9) (push) Failing after 37s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (6) (push) Failing after 33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (6.1) (push) Failing after 3m0s
Tests: nvm install with set -e / test (no nvmrc, v0.39.5, 2 shlvls) (push) Failing after 7m18s
Tests: nvm install with set -e / test (no nvmrc, v0.40.1, 1 shlvl) (push) Failing after 14s
Tests: nvm install with set -e / test (no nvmrc, v0.40.6, 2 shlvls) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, v0.39.3, 2 shlvls) (push) Failing after 16s
Tests: nvm install with set -e / test (nvmrc, v0.39.5, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (no nvmrc, v0.40.6, 1 shlvl) (push) Failing after 7m5s
Tests: nvm install with set -e / test (no nvmrc, v0.40.7, 1 shlvl) (push) Failing after 14s
Tests: nvm install with set -e / test (nvmrc, v0.39.4, 2 shlvls) (push) Failing after 14s
Tests: nvm install with set -e / test (nvmrc, v0.40.0, 1 shlvl) (push) Successful in 14s
Tests: nvm install with set -e / test (nvmrc, v0.40.0, 2 shlvls) (push) Successful in 16s
Tests: nvm install with set -e / test (nvmrc, v0.40.6, 2 shlvls) (push) Failing after 20s
Tests: nvm install with set -e / test (nvmrc, v0.40.7, 1 shlvl) (push) Failing after 19s
Tests: nvm install with set -e / test (nvmrc, v0.40.7, 2 shlvls) (push) Failing after 23s
Tests on Windows: `nvm install` / Cygwin nvm install (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 14, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 14, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 14, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 14, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 18, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 21, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 10, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 12, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 16, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 16, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 16, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 18, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 18, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 18, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 21, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 10, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 10, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 12, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 16, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 18, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 14, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Alpine-3.17) (push) Canceled after 0s
Tests: alpine / musl-binary arm64 (alpine 3, node v24.9.0) (push) Canceled after 0s
Tests: alpine / musl-binary arm64 (alpine 3.20, node v20.20.1) (push) Canceled after 0s
Tests: alpine / all alpine tests (push) Canceled after 0s
Tests: fast / fast (macOS, sh) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3, dash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3, sh) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3, zsh) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.15, dash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.15, zsh) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, sh) (push) Canceled after 0s
Tests: alpine / musl-binary arm64 (alpine 3, node v22.21.1) (push) Canceled after 0s
Tests: fast / fast (WSL Ubuntu-24.04, sh) (push) Canceled after 0s
Tests: fast / fast (WSL Ubuntu-24.04, zsh) (push) Canceled after 0s
`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 |
||
|
|
ea84cb311e |
[Fix] nvm_find_up, nvm_find_project_dir: stop at a Windows drive root instead of looping forever
With a Windows-style `$PWD` (e.g. `D:/Work`, as Git Bash inherits when launched
by a native Windows program), `${path_%/*}` stops changing at `D:`, so the walk
never ends and sourcing `nvm.sh` hangs. Stop when going up doesn't change the
path, which also covers the existing `.` case.
Fixes #3967.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBGzjdkmgq6LSA7SFtjRsY
|
||
|
|
13eee46e7d |
[Fix] nvm_ls_cached: match dots in the version literally, and ignore a trailing dot
Code scanning - action / CodeQL-Build (push) Failing after 1m54s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (push) Skipped
Tests: linting / doctoc (push) Successful in 2m44s
Tests: release process / release (push) Successful in 3m38s
Tests: shellcheck / shellcheck_matrix (bash_completion, bash) (push) Failing after 8m55s
Tests: shellcheck / shellcheck_matrix (nvm.sh, ksh) (push) Failing after 3m49s
Tests: alpine / fast x64 (alpine 3, bash) (push) Failing after 2m47s
Tests: alpine / fast x64 (alpine 3, dash) (push) Failing after 32s
Tests: alpine / fast x64 (alpine 3, sh) (push) Failing after 35s
Tests: alpine / fast x64 (alpine 3.15, dash) (push) Failing after 58s
Tests: alpine / fast x64 (alpine 3.19, zsh) (push) Failing after 32s
Tests: alpine / musl-binary x64 (alpine 3.15, node v14.21.3) (push) Failing after 14m12s
Tests: alpine / musl-binary x64 (alpine 3.20, node v20.18.1) (push) Failing after 1m33s
Tests: fast / fast (dash, gawk) (push) Failing after 37s
Tests: fast / fast (sh, gawk) (push) Failing after 32s
Tests: fast / fast (zsh, gawk) (push) Failing after 32s
Tests: fast / fast (bash, mawk) (push) Failing after 32s
Tests: installation_iojs / installation_iojs without curl (bash) (push) Failing after 1m37s
Tests: installation_iojs / installation_iojs without curl (dash) (push) Failing after 17m18s
Tests: installation_iojs / installation_iojs without curl (sh) (push) Successful in 8m10s
Tests: installation_node / installation_node (dash, without curl) (push) Failing after 33s
Tests: installation_node / installation_node (sh) (push) Failing after 16m24s
Tests: installation_node / installation_node (sh, without curl) (push) Failing after 13m5s
Tests: installation_node / installation_node (zsh) (push) Failing after 16m1s
Tests: xenial / xenial (dash) (push) Failing after 31s
Tests: xenial / all xenial tests (push) Skipped
urchin tests / tests (bash, install_script) (push) Failing after 34s
urchin tests / tests (dash, sourcing) (push) Successful in 8m28s
urchin tests / tests (sh, sourcing) (push) Failing after 32s
urchin tests / tests (zsh, sourcing) (push) Failing after 33s
Tests: nvm install with set -e / test (no nvmrc, HEAD, 2 shlvls) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.39.3, 2 shlvls) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.39.4, 1 shlvl) (push) Failing after 5m59s
Tests: nvm install with set -e / test (no nvmrc, v0.39.5, 1 shlvl) (push) Failing after 1m33s
Tests: nvm install with set -e / test (no nvmrc, v0.39.6, 1 shlvl) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.40.4, 2 shlvls) (push) Failing after 13s
Tests: nvm install with set -e / test (no nvmrc, v0.40.8, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, HEAD, 1 shlvl) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, v0.39.3, 1 shlvl) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, v0.39.4, 1 shlvl) (push) Failing after 12s
Tests: nvm install with set -e / test (no nvmrc, v0.39.6, 2 shlvls) (push) Failing after 33s
Tests: nvm install with set -e / test (no nvmrc, v0.39.7, 2 shlvls) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.40.3, 1 shlvl) (push) Failing after 16s
Tests: nvm install with set -e / test (no nvmrc, v0.40.4, 1 shlvl) (push) Failing after 11s
Tests: nvm install with set -e / test (no nvmrc, v0.40.5, 1 shlvl) (push) Failing after 16s
Tests: nvm install with set -e / test (no nvmrc, v0.40.5, 2 shlvls) (push) Failing after 14s
Tests: nvm install with set -e / test (no nvmrc, v0.40.7, 2 shlvls) (push) Failing after 11s
Tests: nvm install with set -e / test (nvmrc, v0.39.6, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.40.1, 2 shlvls) (push) Failing after 14s
Tests: nvm install with set -e / test (nvmrc, v0.40.3, 1 shlvl) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, v0.39.7, 1 shlvl) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, v0.40.1, 1 shlvl) (push) Failing after 32s
Tests: nvm install with set -e / test (nvmrc, v0.40.5, 1 shlvl) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, v0.40.8, 2 shlvls) (push) Failing after 13s
Tests: nvm install with set -e / finisher (push) Skipped
Tests: alpine / fast arm64 (alpine 3, bash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.15, bash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, bash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, dash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, zsh) (push) Canceled after 0s
Tests: fast / fast (macOS, bash) (push) Canceled after 0s
Tests: fast / fast (macOS, dash) (push) Canceled after 0s
Tests: fast / fast (macOS, zsh) (push) Canceled after 0s
Tests on Windows: `nvm install` / MSYS nvm install (--default 12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 14, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 21, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 10, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 10, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 12, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 14, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 16, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 18, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 21, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 21, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 21, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 21, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, --lts, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, --lts, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 14, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 18, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 21, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, --lts, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 16, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 11, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / tests, on windows (push) Canceled after 0s
Tests: `nvm install-latest-npm` / matrix (push) Failing after 17m53s
Tests: linting / eclint (push) Successful in 3m14s
Tests: linting / all linting (push) Skipped
Tests: nvm install with set -e / matrix (push) Successful in 5s
Tests: shellcheck / shellcheck_matrix (install.sh, bash) (push) Failing after 1m3s
Tests: shellcheck / shellcheck_matrix (nvm-exec, bash) (push) Failing after 1m19s
Tests: shellcheck / shellcheck_matrix (nvm.sh, bash) (push) Failing after 1m47s
Tests: shellcheck / shellcheck_matrix (nvm.sh, dash) (push) Failing after 2m1s
Tests: alpine / fast x64 (alpine 3, zsh) (push) Failing after 33s
Tests: alpine / fast x64 (alpine 3.15, bash) (push) Failing after 32s
Tests: alpine / fast x64 (alpine 3.15, sh) (push) Failing after 32s
Tests: alpine / fast x64 (alpine 3.19, bash) (push) Failing after 32s
Tests: alpine / fast x64 (alpine 3.19, dash) (push) Failing after 32s
Tests: alpine / fast x64 (alpine 3.19, sh) (push) Failing after 32s
Tests: alpine / musl-binary x64 (alpine 3.12, node v12.22.12) (push) Failing after 14m35s
Tests: alpine / musl-binary x64 (alpine 3.10, node v10.24.1) (push) Failing after 32s
Tests: alpine / musl-binary x64 (alpine 3.10, node v8.17.0) (push) Failing after 33s
Tests: fast / fast (bash, gawk) (push) Failing after 1m37s
Tests: fast / fast (dash, mawk) (push) Failing after 33s
Tests: fast / fast (zsh, mawk) (push) Failing after 34s
Tests: installation_iojs / actually compile io.js from source (gcc 4.9 container) (push) Failing after 27s
Tests: installation_node / installation_node (dash) (push) Failing after 2m42s
Tests: xenial / xenial (bash) (push) Failing after 35s
Tests: xenial / xenial (sh) (push) Failing after 32s
Tests: xenial / xenial (zsh) (push) Failing after 33s
urchin tests / tests (bash, sourcing) (push) Failing after 39s
urchin tests / tests (dash, slow) (push) Failing after 31m57s
urchin tests / tests (sh, slow) (push) Failing after 32s
urchin tests / all test suites, all shells (push) Skipped
Tests: nvm install with set -e / test (no nvmrc, HEAD, 1 shlvl) (push) Failing after 33s
Tests: nvm install with set -e / test (no nvmrc, v0.39.3, 1 shlvl) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.39.4, 2 shlvls) (push) Failing after 31s
Tests: nvm install with set -e / test (no nvmrc, v0.40.2, 2 shlvls) (push) Failing after 16s
Tests: nvm install with set -e / test (nvmrc, v0.39.5, 1 shlvl) (push) Failing after 12s
Tests: nvm install with set -e / test (no nvmrc, v0.39.7, 1 shlvl) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.40.0, 1 shlvl) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.40.0, 2 shlvls) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.40.1, 2 shlvls) (push) Failing after 13s
Tests: nvm install with set -e / test (no nvmrc, v0.40.2, 1 shlvl) (push) Failing after 11s
Tests: nvm install with set -e / test (no nvmrc, v0.40.3, 2 shlvls) (push) Failing after 14s
Tests: nvm install with set -e / test (no nvmrc, v0.40.8, 1 shlvl) (push) Failing after 11s
Tests: nvm install with set -e / test (nvmrc, HEAD, 2 shlvls) (push) Failing after 20s
Tests: nvm install with set -e / test (nvmrc, v0.39.6, 1 shlvl) (push) Failing after 15s
Tests: nvm install with set -e / test (nvmrc, v0.39.7, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.40.2, 1 shlvl) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, v0.40.2, 2 shlvls) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, v0.40.3, 2 shlvls) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, v0.40.4, 1 shlvl) (push) Failing after 16s
Tests: nvm install with set -e / test (nvmrc, v0.40.4, 2 shlvls) (push) Failing after 15s
Tests: nvm install with set -e / test (nvmrc, v0.40.5, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.40.6, 1 shlvl) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.40.8, 1 shlvl) (push) Failing after 12s
Tests: alpine / fast arm64 (alpine 3.15, sh) (push) Canceled after 0s
Tests: fast / fast (WSL Ubuntu-24.04, bash) (push) Canceled after 0s
Tests: fast / fast (WSL Ubuntu-24.04, dash) (push) Canceled after 0s
Tests: fast / all fast tests (push) Canceled after 0s
Tests on Windows: `nvm install` / MSYS fail prefix nvm install (push) Canceled after 0s
Tests on Windows: `nvm install` / MSYS nvm install (--lts) (push) Canceled after 0s
Tests on Windows: `nvm install` / MSYS nvm install (--no-progress 10) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 18, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 18, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 18, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 21, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 21, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 10, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 10, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 12, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 12, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 12, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 14, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 14, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 14, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 14, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 16, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 18, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 11, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 11, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, --lts, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 12, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 14, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 14, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 18, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 11, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 21, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 21, Alpine-3.23) (push) Canceled after 0s
Tests: linting / dockerfile_lint (push) Successful in 2m6s
Tests: linting / test_naming (push) Failing after 1m35s
Tests: linting / check_exec (push) Successful in 12m39s
Tests: shellcheck / shellcheck_matrix (nvm.sh, sh) (push) Failing after 1m29s
Tests: shellcheck / shellcheck (push) Skipped
Tests: alpine / fast x64 (alpine 3.15, zsh) (push) Failing after 32s
Tests: alpine / musl-binary x64 (alpine 3, node v22.12.0) (push) Failing after 32s
Tests: alpine / musl-binary x64 (alpine 3.16, node v16.20.2) (push) Failing after 14m16s
Tests: alpine / musl-binary x64 (alpine 3.18, node v18.20.4) (push) Failing after 14m13s
Tests: fast / fast (sh, mawk) (push) Failing after 33s
Tests: installation_iojs / installation_iojs without curl (zsh) (push) Failing after 59s
Tests: installation_iojs / all installation_iojs tests (push) Skipped
Tests: installation_node / installation_node (bash) (push) Failing after 34s
Tests: installation_node / installation_node (bash, without curl) (push) Failing after 44s
Tests: installation_node / installation_node (zsh, without curl) (push) Failing after 1m34s
Tests: installation_node / all installation_node tests (push) Skipped
urchin tests / tests (bash, installation_iojs) (push) Failing after 32s
urchin tests / tests (bash, slow) (push) Failing after 32m53s
urchin tests / tests (dash, installation_iojs) (push) Failing after 3h6m11s
urchin tests / tests (sh, installation_iojs) (push) Failing after 2m41s
urchin tests / tests (zsh, installation_iojs) (push) Failing after 33s
urchin tests / tests (zsh, slow) (push) Failing after 33s
update readme TOC / update readme TOC (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.39.5, 2 shlvls) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.40.7, 1 shlvl) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.39.3, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.39.4, 2 shlvls) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, v0.39.5, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (no nvmrc, v0.40.1, 1 shlvl) (push) Failing after 32s
Tests: nvm install with set -e / test (no nvmrc, v0.40.6, 1 shlvl) (push) Failing after 12s
Tests: nvm install with set -e / test (no nvmrc, v0.40.6, 2 shlvls) (push) Failing after 14s
Tests: nvm install with set -e / test (nvmrc, v0.40.6, 2 shlvls) (push) Failing after 16s
Tests: nvm install with set -e / test (nvmrc, v0.40.7, 1 shlvl) (push) Failing after 15s
Tests: nvm install with set -e / test (nvmrc, v0.40.0, 1 shlvl) (push) Failing after 5m8s
Tests: nvm install with set -e / test (nvmrc, v0.40.0, 2 shlvls) (push) Failing after 32s
Tests: nvm install with set -e / test (nvmrc, v0.40.7, 2 shlvls) (push) Failing after 11s
Tests: alpine / fast arm64 (alpine 3, dash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3, sh) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3, zsh) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.15, dash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.15, zsh) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, sh) (push) Canceled after 0s
Tests: alpine / musl-binary arm64 (alpine 3, node v22.21.1) (push) Canceled after 0s
Tests: alpine / musl-binary arm64 (alpine 3, node v24.9.0) (push) Canceled after 0s
Tests: alpine / musl-binary arm64 (alpine 3.20, node v20.20.1) (push) Canceled after 0s
Tests: alpine / all alpine tests (push) Canceled after 0s
Tests: fast / fast (macOS, sh) (push) Canceled after 0s
Tests: fast / fast (WSL Ubuntu-24.04, sh) (push) Canceled after 0s
Tests: fast / fast (WSL Ubuntu-24.04, zsh) (push) Canceled after 0s
Tests on Windows: `nvm install` / Cygwin nvm install (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 14, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 14, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 14, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 14, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 18, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 21, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 10, Debian-13) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 12, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 16, Debian-12) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 16, Ubuntu-18.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 16, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 18, Ubuntu-20.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 18, Ubuntu-24.04) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 14, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 18, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 21, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 12, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 16, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 18, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 10, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 10, Alpine-3.23) (push) Canceled after 0s
The pattern reached `grep` as a regex, so its dots matched any character: `20.1.1` also matched a cached `v20.111.1`, which `nvm install --offline 20.1.1` could then pick as the newest match. A trailing dot, as in `20.1.`, likewise matched `v20.10.0` but not `v20.1.x`. A bare `v`, `iojs-`, or `iojs-v` now matches every cached node or io.js version respectively. |
||
|
|
f0d372b01b |
[Fix] install.sh: nvm_check_global_modules: don't run a Windows npm under WSL
Under WSL, `PATH` can include a Windows Node install, so `command -v npm` can find its `npm` shell shim, which then failed against Windows paths. That npm is not a system node that nvm would shadow, so under WSL, skip an npm that has an `npm.cmd` beside it: both the Node installer and npm's own shims put one there. Outside WSL (eg, Git Bash or Cygwin), a Windows npm is the system node, so the warning is kept. Fixes #3700. Signed-off-by: NUAAwqy <146524024+NUAAwqy@users.noreply.github.com> Co-Authored-By: Codex <noreply@openai.com> |
||
|
|
3fda4d5542 |
[New] select versions by category: alpha, lts, non-lts, iojs; exclude alphas by default
Node 27 and later publish Alpha prereleases, like `v27.0.0-alpha.1.0.0`, in the main `index.tab`, so `nvm install node` or `nvm install 27` would otherwise pick one. Every version is in exactly one category: `alpha` and `lts` or `non-lts` (by index.tab's LTS column) on the node mirror, and `iojs` on the io.js mirror. Commands select from every category but `alpha`, unless `$NVM_ONLY` lists others, and every command that selects or lists versions takes `--only=<categories>` to override both; an exact alpha needs `alpha` selected, like any other. An LTS selection, like `--lts` or an `lts/` version, can't combine with an `--only=` that excludes `lts`. Telling installed `lts` and `non-lts` versions apart uses the recorded LTS status, and fails rather than guess without it. `nvm alias` also stores `--only=`, so `nvm alias default --only=alpha node` makes the latest installed alpha the default, including in a new shell. |
||
|
|
11df5ed6f1 |
[Perf] nvm_is_installed_exact_version: also take the fast path for an exact prerelease
An installed prerelease, like `v24.0.0-rc.1`, now resolves to itself without the `nvm_ls` pipeline, as releases already do. |
||
|
|
fe2900d176 |
[New] nvm alias: store --lts and --lts=<name>
`nvm alias default --lts node` writes `--lts node` to the alias file, so it resolves to the latest installed LTS version, using each version's recorded LTS status; `--lts=<name>` limits it to one LTS line. The flags of the outermost alias apply when one alias points at another, an alias with a flag this version of nvm doesn't recognize resolves to nothing, rather than ignoring the flag, and `nvm uninstall` also removes aliases with flags that point at the uninstalled version. A new shell never downloads index.tab, so it explains a default alias that needs LTS status that isn't recorded yet. |
||
|
|
e5f1288b40 |
[New] record every node version's LTS status
Each download of node's `index.tab` now merges every version's LTS codename, or `-`, into `$NVM_DIR/.lts-status`, keeping versions that download doesn't list, so the status of an installed version is known, and refreshed on every remote connection. Only an index that includes LTS versions can start the record, so a nightly or release candidate mirror can't, and `nvm_ensure_lts_status` downloads it once for versions installed before it was recorded. `update_test_mocks.sh` writes the record of its `index.tab` mock to `nodejs.org-dist-lts-status.txt`. |
||
|
|
4007c0d062 |
[Tests] bash_completion: don't let zsh's compinit wait for an answer
On runners where zsh considers a completion directory insecure, `compinit` asks whether to use it, and on the test's terminal waited for an answer forever, which hung every Ubuntu `fast` job. The test now sets `ZSH_DISABLE_COMPFIX`, which `bash_completion` already honors, and gives zsh no stdin. |
||
|
|
139ed9ccc6 |
[Fix] nvm: ignore option variables set by the caller
In dash, and in bash for a variable assigned in the command's own prefix (like `PATTERN=x nvm ls`), `local` keeps the outer value, so a variable a subcommand only sets conditionally, like `PATTERN`, `NVM_LTS`, `LTS`, or `VERSION`, could come from the caller, replacing the version argument, applying an LTS filter that was never requested, or making `nvm use`, without a version or an .nvmrc, use the caller's `VERSION`. Each such local is now initialized where it is declared. |
||
|
|
6a085bc8b4 |
[Fix] nvm reinstall-packages: don't print VERSION='' in zsh
`nvm` already declares `VERSION` local, and declaring an existing local again makes zsh print it. |
||
|
|
fe017ae9bd |
[Fix] nvm_alias, nvm_ls_remote_index_tab, nvm use: return the exit code of a failed check
`if ! cmd; then return $?` returns the status of the negation, which is 0, so an uppercase LTS name, or an unusable installed version, was reported but still exited successfully. |
||
|
|
fd23eb2037 |
[Fix] nvm_print_versions: don't mark N/A as installed
With nothing installed, `nvm_ls` prints `N/A`, which then counted as an installed version, so `nvm ls` and an unmatched `nvm ls-remote` printed `N/A *`. |
||
|
|
6cef0edd18 |
[Fix] nvm_ls: no blank line before system when nothing is installed
`nvm ls` then printed an empty row ahead of the system version. |
||
|
|
d65637f2e8 |
[Fix] nvm_print_versions: widen the version column for long versions
Versions longer than 15 characters, like nightlies and release candidates, overflowed the fixed-width column, so `nvm ls` and `nvm ls-remote` misaligned them; the column now also fits the `->` before the current version. |
||
|
|
f58d43f4d5 |
[Fix] nvm_ls: match a prerelease only up to a .
A prerelease pattern matched any installed version containing it, so `nvm use v24.0.0-rc.1` could pick `v24.0.0-rc.10`, and a partial prerelease like `v24.0.0-rc` matched nothing. An installed exact prerelease now resolves to itself, and a partial one matches only versions that continue with a `.`. |
||
|
|
aed19eb997 |
[Fix] nvm_ls: list every installed prerelease, in semver order
`sort -u` keyed only on X.Y.Z treated prereleases of a release, and the release itself, as duplicates, so `nvm ls` hid all but one of them, and which one survived depended on directory order. `nvm_sort_versions` orders them by semver precedence instead, so `v24.0.0-rc.2` sorts before `v24.0.0-rc.10`, and both before `v24.0.0`. |
||
|
|
79214249bb |
[Fix] nvm uninstall: only remove aliases that point at the uninstalled version
Matching alias files by substring also removed aliases to longer versions, so uninstalling v20.1.1 deleted an alias to v20.1.10. Each alias's target is now read the way `nvm_alias` reads it, ignoring comments, and in zsh an empty alias directory no longer errors with "no matches found". |
||
|
|
43a2abbfd5 |
[Fix] nvm_ls_cached: only match whole version numbers
An unanchored `grep` let a pattern match any cached version containing it, so `nvm install --offline 20.1.1` could install a cached v20.1.10, and `nvm install --offline iojs`, whose pattern is empty, matched every cached node version. |
||
|
|
e7363fa669 |
[actions] tests-alpine: time out jobs well before GitHub's 6-hour limit
A hung `fast` job, like the busybox `sh` lanes in `nvm debug`, otherwise ran for 6 hours before being cancelled. `fast` jobs take a few minutes and `musl-binary` jobs under one, so they now time out after 15 and 10. |
||
|
|
898124fd60 |
[Fix] nvm debug: don't let the shell read stdin when asked for its version
busybox's shells have no `--version`, and start an interactive shell instead, so with `$SHELL` set to busybox `sh` on a terminal, `nvm debug` waited for input forever, which hung the alpine `sh` CI lanes in the "mirror URL credentials are masked in output" test. Like the other busybox tools, its version now comes from `--help`, and every shell is given no stdin to read. |
||
|
|
e780535240 |
[Fix] nvm_download: with GNU Wget, follow only same-origin redirects when sending $NVM_AUTH_HEADER
curl 7.58.0 and later drop a custom Authorization header when a redirect leads to another host, but wget sends `--header` along to every redirect target, so on a machine without curl, a mirror that redirected elsewhere handed the credential to that other host. When a header is sent with GNU Wget, run it with `--max-redirect=0`. When it then exits with 8 (an HTTP error, which includes a redirect it did not follow), read the `Location` with one more request, and re-request it only if it keeps the same scheme, host, and port, up to 20 times. A redirect to another origin, including a downgrade to `http`, fails with exit code 8 and an error that names the URL nvm requested and suggests curl. `--max-redirect` is not a BusyBox wget option, so other wgets are invoked as before; the README says so Discovered by Anthropic's OSS Scanner, as ANT-2026-PKUZHTT3; the scanner reported it as a vulnerability, but it is not one. |
||
|
|
e3aa232901 |
[Fix] nvm_download: only send $NVM_AUTH_HEADER to URLs under a mirror it applies to
The header was added to every download, whatever the host. With only `$NVM_NODEJS_ORG_MIRROR` set, a private mirror's credential therefore also went to the default `https://iojs.org/dist` (eg, from `nvm ls-remote`), and with only `$NVM_IOJS_ORG_MIRROR` set, to `https://nodejs.org/dist`; it also went to `npmjs.org` when installing an old npm. Add `nvm_auth_header_applies_to`, which uses `nvm_get_mirror` and accepts a URL only when it is under a mirror, compared literally, with a `/` after the mirror's prefix. When exactly one of the two mirror variables is set, the header belongs to that mirror alone; when both or neither are set, both mirrors (including the defaults, when neither is) still receive it, so the documented example keeps working. An invalid mirror matches nothing, and no empty `Authorization:` header is sent when sanitizing leaves nothing Discovered by Anthropic's OSS Scanner, as ANT-2026-YPW87EDH; the scanner reported it as a vulnerability, but it is not one. |
||
|
|
6bbbf3e8d3 |
[Tests] nvm_download: point the httpbin Authorization check at a configured mirror
The httpbin check sends `$NVM_AUTH_HEADER` to `http://127.0.0.1/bearer` without configuring a mirror. Set `$NVM_NODEJS_ORG_MIRROR` to that host, as a real user of the header would, so the check keeps exercising the header once it is only sent to URLs under a mirror Discovered by Anthropic's OSS Scanner, as ANT-2026-YPW87EDH; the scanner reported it as a vulnerability, but it is not one. |
||
|
|
00217de1e1 |
[Fix] install.sh: don't let a git repository in the current directory affect git ls-remote
`install_nvm_from_git` checked whether `$NVM_INSTALL_VERSION` is a ref with a bare `git ls-remote`, which discovers and loads the config of whatever repository contains the current directory. That repository's `url.*.insteadOf` and `core.sshCommand` could then redirect or hijack the check, unlike every other git command in the function, which already passes `--git-dir="$INSTALL_DIR"/.git`. Pass `--git-dir` here too; `ls-remote` works even when that directory does not exist yet, as on a fresh install Discovered by Anthropic's OSS Scanner, as ANT-2026-JS4YHKRK; the scanner reported it as a vulnerability, but it is not one. |
||
|
|
0333df56ca |
[Robustness] install.sh, nvm uninstall: pass the version to grep with -e
`install_nvm_from_git` passed `$NVM_INSTALL_VERSION` to grep as a bare argument, and `nvm uninstall` did the same with the resolved version when looking for aliases that point to it, so a value starting with `-` would have been parsed as grep options rather than as the pattern. Neither value crosses a trust boundary (the first is the user's own environment variable, and the second is an already-installed version, which never starts with `-`), but every grep that receives a version should put it after `-e`, which POSIX specifies and which nvm.sh already uses elsewhere Discovered by Anthropic's OSS Scanner, alongside vulnerability ANT-2026-EN9DM7WC; this change is not itself a vulnerability fix. |
||
|
|
cbd8f8e920 |
[Fix] nvm_remote_versions: only consult io.js's version list for majors 1 through 3
io.js only released v1 through v3, but its version list was downloaded and searched for every pattern, including ones like `0.12` or `20` that can only ever match node versions. Besides the needless index.tab download on every such `nvm install`, io.js's "no match" status was returned even when node had matches, so `nvm ls-remote 20` printed node's versions and then exited 3. Patterns whose major is 0 or 4+ now only consult node's list, so `nvm ls-remote` exits 0 for them when node has matching versions. The listed and resolved versions are unchanged Discovered by Anthropic's OSS Scanner, as ANT-2026-AKH0HYWD; the scanner reported it as a vulnerability, but it is not one. |
||
|
|
59e008fd62 |
[Fix] nvm_remote_versions: place io.js versions by major version, not at the literal v4.0.0
io.js versions were inserted into node's version list immediately before the `v4.0.0` line. Whenever node's filtered list did not contain that exact line, every io.js version was appended after all node versions, including newer ones, so `nvm_remote_version`'s `tail -1` could pick an io.js version over the latest matching node version. Node's list is sorted, so it is now split at the first version with a nonzero major, which keeps io.js versions between node v0.x and node v4+ regardless of which node versions the pattern matched Discovered by Anthropic's OSS Scanner, as ANT-2026-AKH0HYWD; the scanner reported it as a vulnerability, but it is not one. |