Commit Graph
675 Commits
Author SHA1 Message Date
Jordan Harband 699c898671 [Robustness] nvm_nvmrc_invalid_msg: only show an excerpt of the parsed content
Code scanning - action / CodeQL-Build (push) Failing after 1m43s
Tests: `nvm install-latest-npm` / matrix (push) Successful in 25s
Tests: alpine / fast x64 (alpine 3, bash) (push) Failing after 1m51s
Tests: alpine / musl-binary x64 (alpine 3.10, node v10.24.1) (push) Failing after 28s
Tests: installation_iojs / installation_iojs without curl (dash) (push) Successful in 2m18s
Tests: installation_iojs / installation_iojs without curl (zsh) (push) Successful in 2m21s
Tests: fast / fast (zsh, gawk) (push) Failing after 7m38s
Tests: installation_node / installation_node (bash) (push) Failing after 1m21s
Tests: installation_node / installation_node (dash) (push) Failing after 24s
Tests: installation_iojs / actually compile io.js from source (gcc 4.9 container) (push) Failing after 53s
Tests: installation_node / installation_node (zsh) (push) Failing after 1m13s
urchin tests / tests (sh, slow) (push) Failing after 7m53s
urchin tests / tests (zsh, sourcing) (push) Successful in 1m34s
urchin tests / all test suites, all shells (push) Skipped
update readme TOC / update readme TOC (push) Successful in 1m7s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (14.16) (push) Successful in 53s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (4.6) (push) Successful in 1m1s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (8) (push) Successful in 56s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (15) (push) Successful in 56s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (25) (push) Successful in 53s
Tests: nvm install with set -e / test (no nvmrc, v0.39.3, 2 shlvls) (push) Failing after 11s
Tests: nvm install with set -e / test (no nvmrc, v0.40.2, 1 shlvl) (push) Failing after 11s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (9.2) (push) Successful in 56s
Tests: linting / all linting (push) Successful in 1s
Tests: nvm install with set -e / test (no nvmrc, v0.39.4, 2 shlvls) (push) Failing after 10s
Tests: nvm install with set -e / test (no nvmrc, v0.40.1, 1 shlvl) (push) Failing after 10s
Tests: nvm install with set -e / test (no nvmrc, v0.40.1, 2 shlvls) (push) Failing after 11s
Tests: nvm install with set -e / test (no nvmrc, v0.40.8, 1 shlvl) (push) Failing after 10s
Tests: nvm install with set -e / test (no nvmrc, v0.40.8, 2 shlvls) (push) Failing after 11s
Tests: nvm install with set -e / test (nvmrc, HEAD, 1 shlvl) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.39.5, 2 shlvls) (push) Failing after 11s
Tests: nvm install with set -e / test (no nvmrc, v0.40.4, 2 shlvls) (push) Failing after 11s
Tests: nvm install with set -e / test (nvmrc, v0.40.5, 1 shlvl) (push) Failing after 11s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (push) Successful in 2s
Tests on Windows: `nvm install` / MSYS nvm install (--lts) (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 (, 14, Ubuntu-18.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, Debian-13) (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, Debian-12) (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-12) (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, 12, Ubuntu-20.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, 21, Debian-13) (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 (, 12, Alpine-3.23) (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 (, 16, 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: alpine / fast arm64 (alpine 3.15, sh) (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 / all fast tests (push) Canceled after 0s
Tests: linting / test_naming (push) Successful in 13s
Tests: nvm install with set -e / matrix (push) Successful in 8s
Tests: alpine / fast x64 (alpine 3.15, bash) (push) Failing after 5s
Tests: alpine / fast x64 (alpine 3.15, zsh) (push) Failing after 5s
Tests: alpine / fast x64 (alpine 3.19, dash) (push) Failing after 10s
Tests: alpine / fast x64 (alpine 3.19, zsh) (push) Failing after 1m43s
Tests: alpine / musl-binary x64 (alpine 3.12, node v12.22.12) (push) Failing after 31s
Tests: fast / fast (bash, gawk) (push) Failing after 17m39s
Tests: fast / fast (dash, mawk) (push) Failing after 2m58s
Tests: installation_iojs / installation_iojs without curl (sh) (push) Successful in 2m13s
Tests: xenial / xenial (sh) (push) Failing after 1m13s
Tests: installation_node / all installation_node tests (push) Skipped
Tests: xenial / xenial (bash) (push) Failing after 1m11s
urchin tests / tests (bash, slow) (push) Failing after 10m23s
urchin tests / tests (zsh, slow) (push) Failing after 8m6s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (0.12) (push) Successful in 1m6s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (1) (push) Successful in 1m5s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (11) (push) Successful in 54s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (13) (push) Successful in 54s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (2) (push) Successful in 1m1s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (6) (push) Successful in 1m21s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (12) (push) Successful in 54s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (17) (push) Successful in 55s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (23) (push) Successful in 51s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (24) (push) Successful in 52s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (4.4) (push) Successful in 1m2s
Tests: nvm install with set -e / test (no nvmrc, v0.39.4, 1 shlvl) (push) Failing after 13s
Tests: nvm install with set -e / test (no nvmrc, v0.39.5, 2 shlvls) (push) Failing after 11s
Tests: nvm install with set -e / test (no nvmrc, v0.39.6, 1 shlvl) (push) Failing after 11s
Tests: nvm install with set -e / test (no nvmrc, v0.40.0, 2 shlvls) (push) Failing after 10s
Tests: nvm install with set -e / test (nvmrc, v0.40.0, 2 shlvls) (push) Successful in 13s
Tests: nvm install with set -e / test (nvmrc, v0.40.1, 1 shlvl) (push) Failing after 11s
Tests: nvm install with set -e / test (no nvmrc, v0.40.3, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.39.4, 2 shlvls) (push) Failing after 11s
Tests: nvm install with set -e / test (nvmrc, v0.40.5, 2 shlvls) (push) Failing after 10s
Tests: nvm install with set -e / test (nvmrc, v0.40.4, 2 shlvls) (push) Failing after 13s
Tests on Windows: `nvm install` / MSYS fail prefix nvm install (push) Canceled after 0s
Tests on Windows: `nvm install` / MSYS nvm install (--default 12) (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, Debian-12) (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, Ubuntu-18.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, 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 (, 18, Debian-13) (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 (, 21, Debian-13) (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, 12, Ubuntu-24.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, 21, Debian-12) (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 (, 18, 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, 11, 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, 14, 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, 18, 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: alpine / fast arm64 (alpine 3, 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.20, node v20.20.1) (push) Canceled after 0s
Tests: fast / fast (macOS, dash) (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: release process / release (push) Successful in 46s
Tests: shellcheck / shellcheck_matrix (bash_completion, bash) (push) Failing after 51s
Tests: alpine / fast x64 (alpine 3, dash) (push) Failing after 56s
Tests: alpine / fast x64 (alpine 3, sh) (push) Failing after 6s
Tests: shellcheck / shellcheck_matrix (nvm.sh, bash) (push) Failing after 52s
Tests: shellcheck / shellcheck_matrix (nvm.sh, ksh) (push) Failing after 51s
Tests: alpine / fast x64 (alpine 3.15, dash) (push) Failing after 16s
Tests: alpine / fast x64 (alpine 3.15, sh) (push) Failing after 5s
Tests: alpine / fast x64 (alpine 3.19, bash) (push) Failing after 23s
Tests: alpine / musl-binary x64 (alpine 3.20, node v20.18.1) (push) Failing after 27s
Tests: fast / fast (dash, gawk) (push) Failing after 3m47s
Tests: fast / fast (zsh, mawk) (push) Failing after 3m50s
Tests: installation_iojs / all installation_iojs tests (push) Skipped
urchin tests / tests (bash, install_script) (push) Successful in 2m49s
Tests: installation_node / installation_node (sh) (push) Failing after 1m11s
Tests: xenial / xenial (zsh) (push) Failing after 1m15s
urchin tests / tests (zsh, installation_iojs) (push) Failing after 2m2s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (19) (push) Successful in 54s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (20.4) (push) Successful in 53s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (7) (push) Successful in 1m13s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (16) (push) Successful in 55s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (20.5) (push) Successful in 50s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (26) (push) Successful in 51s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (3) (push) Successful in 1m3s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (4) (push) Successful in 1m2s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (5.9) (push) Successful in 1m1s
Tests: nvm install with set -e / test (no nvmrc, v0.40.2, 2 shlvls) (push) Failing after 10s
Tests: nvm install with set -e / test (no nvmrc, v0.40.3, 1 shlvl) (push) Failing after 10s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (9.0) (push) Successful in 55s
Tests: nvm install with set -e / test (no nvmrc, v0.39.7, 1 shlvl) (push) Failing after 11s
Tests: nvm install with set -e / test (no nvmrc, v0.40.7, 1 shlvl) (push) Failing after 10s
Tests: nvm install with set -e / test (nvmrc, v0.39.7, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (no nvmrc, v0.40.5, 1 shlvl) (push) Failing after 10s
Tests: nvm install with set -e / test (no nvmrc, v0.40.6, 1 shlvl) (push) Failing after 13s
Tests: nvm install with set -e / test (nvmrc, HEAD, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.39.4, 1 shlvl) (push) Failing after 11s
Tests: nvm install with set -e / test (nvmrc, v0.39.6, 2 shlvls) (push) Failing after 11s
Tests: nvm install with set -e / test (nvmrc, v0.40.2, 1 shlvl) (push) Failing after 10s
Tests: nvm install with set -e / test (nvmrc, v0.40.7, 1 shlvl) (push) Failing after 10s
Tests: nvm install with set -e / test (nvmrc, v0.40.7, 2 shlvls) (push) Failing after 10s
Tests: nvm install with set -e / test (nvmrc, v0.40.8, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.40.3, 2 shlvls) (push) Failing after 11s
Tests on Windows: `nvm install` / WSL nvm install (, 10, Ubuntu-18.04) (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-20.04) (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 (, 16, Ubuntu-20.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 (script, 10, Debian-13) (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, 14, Debian-12) (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, 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, 18, Debian-13) (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 (, 10, Alpine-3.23) (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 (, 14, Alpine-3.17) (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 (, 21, 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.23) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3, bash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3, sh) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, bash) (push) Canceled after 0s
Tests: fast / fast (macOS, sh) (push) Canceled after 0s
Tests: fast / fast (macOS, zsh) (push) Canceled after 0s
Tests: fast / fast (WSL Ubuntu-24.04, dash) (push) Canceled after 0s
Tests: linting / eclint (push) Successful in 1m46s
Tests: linting / dockerfile_lint (push) Successful in 1m15s
Tests: linting / doctoc (push) Successful in 1m18s
Tests: linting / check_exec (push) Successful in 1m19s
Tests: alpine / fast x64 (alpine 3, zsh) (push) Failing after 5s
Tests: shellcheck / shellcheck_matrix (install.sh, bash) (push) Failing after 51s
Tests: shellcheck / shellcheck_matrix (nvm-exec, bash) (push) Failing after 50s
Tests: shellcheck / shellcheck_matrix (nvm.sh, dash) (push) Failing after 50s
Tests: shellcheck / shellcheck_matrix (nvm.sh, sh) (push) Failing after 54s
Tests: shellcheck / shellcheck (push) Skipped
Tests: alpine / fast x64 (alpine 3.19, sh) (push) Failing after 1m50s
Tests: alpine / musl-binary x64 (alpine 3, node v22.12.0) (push) Failing after 29s
Tests: alpine / musl-binary x64 (alpine 3.18, node v18.20.4) (push) Failing after 27s
Tests: fast / fast (sh, mawk) (push) Failing after 2m44s
Tests: alpine / musl-binary x64 (alpine 3.15, node v14.21.3) (push) Failing after 35s
Tests: alpine / musl-binary x64 (alpine 3.16, node v16.20.2) (push) Failing after 31s
Tests: fast / fast (sh, gawk) (push) Failing after 3m52s
Tests: installation_iojs / installation_iojs without curl (bash) (push) Successful in 2m17s
Tests: installation_node / installation_node (bash, without curl) (push) Failing after 1m13s
Tests: xenial / all xenial tests (push) Skipped
Tests: installation_node / installation_node (sh, without curl) (push) Failing after 1m11s
Tests: installation_node / installation_node (zsh, without curl) (push) Failing after 1m12s
Tests: xenial / xenial (dash) (push) Failing after 1m11s
urchin tests / tests (bash, installation_iojs) (push) Failing after 1m51s
urchin tests / tests (dash, installation_iojs) (push) Failing after 2m5s
urchin tests / tests (dash, slow) (push) Failing after 8m17s
urchin tests / tests (bash, sourcing) (push) Successful in 1m40s
urchin tests / tests (dash, sourcing) (push) Successful in 1m15s
urchin tests / tests (sh, sourcing) (push) Successful in 1m15s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (0.10) (push) Successful in 1m3s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (10) (push) Successful in 54s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (14) (push) Successful in 56s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (18) (push) Successful in 52s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (21) (push) Successful in 52s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (6.1) (push) Successful in 1m7s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (9.1) (push) Successful in 56s
Tests: nvm install with set -e / test (no nvmrc, HEAD, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (no nvmrc, v0.39.3, 1 shlvl) (push) Failing after 10s
Tests: nvm install with set -e / test (no nvmrc, v0.39.5, 1 shlvl) (push) Failing after 11s
Tests: nvm install with set -e / test (no nvmrc, v0.39.6, 2 shlvls) (push) Failing after 11s
Tests: nvm install with set -e / test (no nvmrc, v0.40.0, 1 shlvl) (push) Failing after 10s
Tests: nvm install with set -e / test (no nvmrc, v0.40.6, 2 shlvls) (push) Failing after 10s
Tests: nvm install with set -e / test (nvmrc, v0.39.3, 2 shlvls) (push) Failing after 10s
Tests: nvm install with set -e / test (nvmrc, v0.40.2, 2 shlvls) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.40.3, 1 shlvl) (push) Failing after 11s
Tests: nvm install with set -e / test (no nvmrc, v0.40.4, 1 shlvl) (push) Failing after 10s
Tests: nvm install with set -e / test (nvmrc, v0.39.3, 1 shlvl) (push) Failing after 10s
Tests: nvm install with set -e / test (nvmrc, v0.39.5, 1 shlvl) (push) Failing after 12s
Tests: nvm install with set -e / test (nvmrc, v0.39.6, 1 shlvl) (push) Failing after 11s
Tests: nvm install with set -e / test (nvmrc, v0.39.7, 1 shlvl) (push) Failing after 10s
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.6, 1 shlvl) (push) Failing after 10s
Tests: nvm install with set -e / test (nvmrc, v0.40.6, 2 shlvls) (push) Failing after 10s
Tests: nvm install with set -e / test (nvmrc, v0.40.8, 1 shlvl) (push) Failing after 11s
Tests: nvm install with set -e / test (nvmrc, v0.40.4, 1 shlvl) (push) Failing after 11s
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, Debian-13) (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 (, 18, Debian-12) (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, Ubuntu-20.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, 14, Debian-13) (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-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, 16, Ubuntu-18.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 (, 10, Alpine-3.17) (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 (script, --lts, 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` / tests, on windows (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3, zsh) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.15, bash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, dash) (push) Canceled after 0s
Tests: alpine / musl-binary arm64 (alpine 3, node v22.21.1) (push) Canceled after 0s
Tests: alpine / all alpine tests (push) Canceled after 0s
Tests: fast / fast (WSL Ubuntu-24.04, bash) (push) Canceled after 0s
Tests: alpine / musl-binary x64 (alpine 3.10, node v8.17.0) (push) Failing after 23s
Tests: fast / fast (bash, mawk) (push) Failing after 3m35s
Tests: installation_node / installation_node (dash, without curl) (push) Failing after 1m20s
urchin tests / tests (sh, installation_iojs) (push) Failing after 1m45s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (14.17) (push) Successful in 56s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (20) (push) Successful in 51s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (22) (push) Successful in 52s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (4.5) (push) Successful in 1m1s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (5) (push) Successful in 1m6s
Tests: nvm install with set -e / test (no nvmrc, HEAD, 1 shlvl) (push) Failing after 13s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (9) (push) Successful in 54s
Tests: nvm install with set -e / test (no nvmrc, v0.39.7, 2 shlvls) (push) Failing after 10s
Tests: nvm install with set -e / test (no nvmrc, v0.40.7, 2 shlvls) (push) Failing after 10s
Tests: nvm install with set -e / test (no nvmrc, v0.40.5, 2 shlvls) (push) Failing after 10s
Tests: nvm install with set -e / test (nvmrc, v0.40.0, 1 shlvl) (push) Successful in 10s
Tests: nvm install with set -e / finisher (push) Skipped
Tests on Windows: `nvm install` / Cygwin nvm install (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, Ubuntu-24.04) (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 (, 18, Alpine-3.23) (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, 11, Alpine-3.23) (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, dash) (push) Canceled after 0s
Tests: alpine / musl-binary arm64 (alpine 3, node v24.9.0) (push) Canceled after 0s
The invalid `.nvmrc` message printed all of the file's parsed content, so a large file that is not really an `.nvmrc` was printed in full. It now shows at most the first 10 lines, each cut to 100 characters, and marks anything left out with `[...]`; a real `.nvmrc` is well within those limits.

This is hardening, not a vulnerability fix: since 67268ebc (the fix for ANT-2026-G9REVGKT), the content of a symlinked `.nvmrc` is never shown, so this message only ever shows the content of a regular `.nvmrc`.
Found by Anthropic's OSS Scanner while analyzing ANT-2026-G9REVGKT.
2026-10-17 22:38:06 -07:00
Jordan Harband cfb33c84ed [Fix] nvm_nvmrc_invalid_msg: respect --silent
The invalid `.nvmrc` message, which includes the file's parsed content, was printed even when `NVM_SILENT` was set (eg, by `nvm use --silent`), unlike nvm's other `.nvmrc` messages. It is now suppressed there too; the exit status still reports the invalid file.

This is hardening, not a vulnerability fix: since 67268ebc (the fix for ANT-2026-G9REVGKT), the content of a symlinked `.nvmrc` is never shown, so this message only ever shows the content of a regular `.nvmrc`.
Found by Anthropic's OSS Scanner while analyzing ANT-2026-G9REVGKT.
2026-10-17 22:38:05 -07:00
Jordan Harband 903e349369 [Fix] nvm_download: pass $NVM_AUTH_HEADER to curl and GNU Wget in a config file, not as an argument
The header was passed as a `--header` argument, so it was readable by anyone who could see the downloader's command line.

curl now reads it as `header = "…"` from a config on stdin (`--config -`); the sanitized value can contain neither `"` nor `\` nor a line break, so it cannot escape the quoted string or add another option.
GNU Wget only reads a config file that is a regular file, so a subshell writes the header to a `mktemp` file in `$TMPDIR` (mode 0600), after a copy of the user's `$WGETRC` or `~/.wgetrc`, which that file replaces, and points `WGETRC` at it;
traps on EXIT, HUP, INT, and TERM remove it, and `WGETRC` never reaches the user's shell.
BusyBox wget reads no config file and has no option for one, so it still gets the header as an argument; the README recommends curl on shared machines.

Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-540RL2U6.
2026-10-17 22:28:01 -07:00
Jordan Harband bce663e387 [Fix] nvm_ls_remote_index_tab, nvm_remote_version, nvm_ls_cached: pass the version pattern to grep with -e
The requested version pattern was passed to grep as a bare argument,
so a pattern starting with `-` was parsed as grep options instead.
That pattern can come from a `.nvmrc` in a repository the user cloned,
or, for implicit aliases like `node` and `stable`,
from the version column of the mirror's index.tab.
A pattern like `-Rohenpm_[A-Za-z0-9]*` made GNU grep ignore the version list on stdin and search the current directory recursively,
following symlinks, so a string from a local file
(such as an npm token in a `.npmrc`) was taken as the "version", printed,
and requested from the mirror in the download URLs;
since the version list was never read, this also worked with `--offline`.
Pass the pattern after `-e` in `nvm_ls_remote_index_tab`
(which also covers `nvm_ls_remote`, `nvm_ls_remote_iojs`, and `nvm_remote_versions`),
in the post-check in `nvm_remote_version`, and in `nvm_ls_cached`,
so a leading `-` is just part of a pattern that matches no version.

Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-EN9DM7WC.
2026-10-16 22:28:12 -07:00
Jordan Harband 4049296ca8 [Fix] nvm_die_on_prefix: never let a project .npmrc choose which npmrc file --delete-prefix edits
`nvm use --delete-prefix`, which nvm itself recommends when it finds a `prefix` or `globalconfig` setting, ran `npm config delete` from the current directory.
For a project `.npmrc`, it ran a bare `npm config delete prefix`/`globalconfig`, so npm loaded that untrusted file first, and its `userconfig`, `globalconfig`, or `location=global` keys picked which file npm rewrote, deleted, or chmodded to 0666 - eg, `~/.bashrc` or `~/.aws/credentials`.
The builtin and user branches pinned `--userconfig`, but still loaded the project file, so a project `location=global` plus an indented ` globalconfig=` (which nvm's check does not match) redirected those writes the same way.
`npm config delete` never edits the project file anyway, so that branch could not do what it claimed.

For the project npmrc, no longer run npm at all: with `--delete-prefix`, warn that project npmrc files are not modified and must be edited by hand, and continue, as before.
For the builtin, global, and user npmrc files, pass `--prefix` set to the version directory, so npm does not walk up from the current directory to load the project npmrc, and its global config resolves to that version's `etc/npmrc`.

Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-WYRTKBQ5.
2026-10-16 20:08:01 -07:00
Jordan Harband 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.
2026-10-16 22:02:45 -07:00
Jordan Harband 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.
2026-10-16 21:35:44 -07:00
Yashvardhan Thanvi 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.
2026-11-04 00:37:28 +05:30
Yashvardhan Thanvi 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.
2026-11-04 00:35:16 +05:30
Jordan Harband 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.
2026-11-03 16:46:55 -06:00
Jordan Harband 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.
2026-11-03 14:42:50 -06:00
Wei-Lun Li 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>
2026-11-02 01:47:37 +09:00
NUAAwqy 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.
2026-10-29 17:46:35 +00:00
Vaibhav CheruvuandJordan Harband 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>
2026-11-03 13:21:38 -06:00
NUAAwqyandJordan Harband 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 139ed9c did for `PATTERN`, `NVM_LTS`, `LTS` and `VERSION`.
`local UNSTABLE` keeps the caller's value the same way,
which its `N/A` fallback doesn't cover, so it is initialized too.

The nounset test now covers the two states that leave `stable` unresolved,
and the caller test that `nvm ls stable` answers the same either way,
and that an outer `UNSTABLE` doesn't become the `unstable` alias.

Co-authored-by: NUAAwqy <146524024+NUAAwqy@users.noreply.github.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2026-10-29 17:08:50 +00:00
NUAAwqy 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.
2026-10-29 16:59:39 +00:00
NUAAwqy 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.
2026-10-29 14:59:29 +00:00
Wei-Lun Li 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>
2026-10-29 09:48:45 +09:00
Jay Hemnani 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.
2026-10-15 18:13:32 +05:30
Jordan Harband 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.
2026-11-02 11:34:39 -06:00
Jordan Harband 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.
2026-11-02 11:27:17 -06:00
Jordan Harband 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.
2026-11-02 13:53:00 -06:00
maliv2 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
2026-10-14 20:53:08 +03:00
Jordan Harband 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.
2026-11-02 12:30:15 -06:00
Mola-maker 8486d07a5e [Fix] nvm_strip_path: preserve literal backslashes in NVM_DIR 2026-11-02 12:16:01 -06:00
Jordan Harband 5e38bc0cae [Tests] pin --lts and node installs to end-of-life lines, so a new node release can't break them
Tests: linting / eclint (push) Failing after 2m50s
Tests: linting / dockerfile_lint (push) Failing after 7m7s
Code scanning - action / CodeQL-Build (push) Failing after 1m33s
Tests: linting / check_exec (push) Successful in 7m53s
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, zsh) (push) Failing after 6m46s
Tests: alpine / fast x64 (alpine 3.15, bash) (push) Failing after 5m47s
Tests: alpine / fast x64 (alpine 3.15, dash) (push) Failing after 17m17s
Tests: alpine / musl-binary x64 (alpine 3.10, node v8.17.0) (push) Failing after 34s
Tests: alpine / musl-binary x64 (alpine 3.18, node v18.20.4) (push) Failing after 33s
Tests: alpine / musl-binary x64 (alpine 3.20, node v20.18.1) (push) Failing after 33s
Tests: fast / fast (dash, mawk) (push) Failing after 32s
Tests: fast / fast (sh, mawk) (push) Failing after 7m3s
Tests: installation_iojs / installation_iojs without curl (sh) (push) Successful in 9m35s
Tests: installation_iojs / installation_iojs without curl (dash) (push) Failing after 6m56s
urchin tests / tests (dash, installation_iojs) (push) Failing after 1m54s
urchin tests / tests (sh, installation_iojs) (push) Failing after 32s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (11) (push) Failing after 33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (17) (push) Failing after 33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (20) (push) Successful in 1m17s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (20.4) (push) Successful in 1m17s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (22) (push) Successful in 1m4s
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.6) (push) Successful in 2m39s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (9.1) (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, 2 shlvls) (push) Failing after 32s
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.6, 1 shlvl) (push) Failing after 5m8s
Tests: nvm install with set -e / test (nvmrc, v0.39.5, 2 shlvls) (push) Failing after 12s
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.6, 1 shlvl) (push) Failing after 7m5s
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.2, 2 shlvls) (push) Failing after 15s
Tests on Windows: `nvm install` / MSYS fail prefix nvm install (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-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, Ubuntu-20.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-12) (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 (, 18, Ubuntu-24.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-18.04) (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, 14, Ubuntu-24.04) (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, 16, Ubuntu-24.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 (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 (, --lts, Alpine-3.23) (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 (, 12, Alpine-3.17) (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, 12, Alpine-3.23) (push) Canceled after 0s
Tests: fast / fast (macOS, dash) (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.19, bash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, zsh) (push) Canceled after 0s
Tests: alpine / musl-binary arm64 (alpine 3, node v22.21.1) (push) Canceled after 0s
Tests: `nvm install-latest-npm` / matrix (push) Successful in 7m34s
Tests: xenial / xenial (dash) (push) Failing after 32s
Tests: shellcheck / shellcheck_matrix (nvm.sh, dash) (push) Failing after 33s
Tests: alpine / fast x64 (alpine 3, bash) (push) Failing after 33s
Tests: release process / release (push) Successful in 1m49s
Tests: alpine / fast x64 (alpine 3.15, zsh) (push) Failing after 16m49s
Tests: alpine / fast x64 (alpine 3.19, bash) (push) Failing after 15m49s
Tests: alpine / musl-binary x64 (alpine 3, node v22.12.0) (push) Failing after 33s
Tests: alpine / musl-binary x64 (alpine 3.10, node v10.24.1) (push) Failing after 32s
Tests: fast / fast (bash, gawk) (push) Failing after 32s
Tests: fast / fast (dash, gawk) (push) Failing after 33s
Tests: installation_node / installation_node (dash) (push) Failing after 22m18s
Tests: installation_node / installation_node (zsh) (push) Failing after 34s
Tests: installation_node / all installation_node tests (push) Skipped
Tests: xenial / xenial (bash) (push) Failing after 33s
urchin tests / tests (bash, installation_iojs) (push) Failing after 4m55s
Tests: xenial / all xenial tests (push) Skipped
urchin tests / tests (bash, sourcing) (push) Failing after 1m32s
urchin tests / tests (dash, slow) (push) Failing after 32s
urchin tests / tests (zsh, sourcing) (push) Failing after 2m58s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (0.12) (push) Successful in 8m51s
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 (2) (push) Failing after 35s
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.1) (push) Failing after 3m0s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (7) (push) Failing after 32s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (9.0) (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, 2 shlvls) (push) Failing after 7m18s
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.40.0, 1 shlvl) (push) Failing after 15s
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.6, 2 shlvls) (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 (no nvmrc, v0.40.5, 2 shlvls) (push) Failing after 3m26s
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.4, 2 shlvls) (push) Failing after 14s
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.1, 1 shlvl) (push) Failing after 13s
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.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.7, 2 shlvls) (push) Failing after 23s
Tests: nvm install with set -e / finisher (push) Skipped
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, Debian-13) (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 (, 21, Debian-13) (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 (, 21, Ubuntu-24.04) (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, 14, 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 (, 10, 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 (script, --lts, 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, 11, Alpine-3.17) (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.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.23) (push) Canceled after 0s
Tests: fast / fast (macOS, sh) (push) Canceled after 0s
Tests: fast / fast (macOS, zsh) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 21, Alpine-3.17) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3, bash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3, sh) (push) Canceled after 0s
Tests: fast / fast (WSL Ubuntu-24.04, sh) (push) Canceled after 0s
Tests: linting / doctoc (push) Successful in 10m52s
Tests: linting / test_naming (push) Successful in 16s
Tests: linting / all linting (push) Skipped
Tests: shellcheck / shellcheck_matrix (nvm.sh, bash) (push) Failing after 33s
Tests: shellcheck / shellcheck_matrix (nvm.sh, ksh) (push) Failing after 32s
Tests: shellcheck / shellcheck_matrix (install.sh, bash) (push) Failing after 2m5s
Tests: shellcheck / shellcheck_matrix (nvm.sh, sh) (push) Failing after 32s
Tests: shellcheck / shellcheck (push) Skipped
Tests: alpine / fast x64 (alpine 3.19, sh) (push) Failing after 1m32s
Tests: fast / fast (sh, gawk) (push) Failing after 33s
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 (sh) (push) Failing after 32s
Tests: xenial / xenial (sh) (push) Failing after 32s
urchin tests / tests (sh, slow) (push) Failing after 33s
urchin tests / tests (sh, sourcing) (push) Failing after 32s
urchin tests / tests (zsh, installation_iojs) (push) Failing after 32s
urchin tests / tests (zsh, slow) (push) Failing after 39m44s
urchin tests / all test suites, all shells (push) Skipped
update readme TOC / update readme TOC (push) Failing after 33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (1) (push) Failing after 1m34s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (13) (push) Failing after 39s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (14) (push) Failing after 32s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (15) (push) Failing after 1m33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (23) (push) Failing after 17m1s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (26) (push) Failing after 34s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (4) (push) Successful in 3m6s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (5) (push) Failing after 32s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (push) Skipped
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, v0.39.4, 1 shlvl) (push) Failing after 16s
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 (no nvmrc, v0.40.5, 1 shlvl) (push) Failing after 5m46s
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.40.1, 2 shlvls) (push) Failing after 12s
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.6, 1 shlvl) (push) Failing after 21s
Tests: nvm install with set -e / test (nvmrc, v0.40.8, 2 shlvls) (push) Failing after 7m7s
Tests on Windows: `nvm install` / Cygwin nvm install (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, Debian-13) (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, 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 (, 21, 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, Ubuntu-18.04) (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, 14, Ubuntu-20.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-12) (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, 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 (, 11, 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, 12, 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 (script, 18, 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 / all alpine tests (push) Canceled after 0s
Tests: fast / fast (macOS, bash) (push) Canceled after 0s
Tests on Windows: `nvm install` / tests, on windows (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3, dash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3, zsh) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.15, bash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, dash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, sh) (push) Canceled after 0s
Tests: fast / all fast tests (push) Canceled after 0s
Tests: nvm install with set -e / matrix (push) Successful in 8s
Tests: shellcheck / shellcheck_matrix (bash_completion, bash) (push) Failing after 4m16s
Tests: shellcheck / shellcheck_matrix (nvm-exec, bash) (push) Failing after 32s
Tests: alpine / fast x64 (alpine 3.19, dash) (push) Failing after 1m32s
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.16, node v16.20.2) (push) Failing after 1m33s
Tests: fast / fast (bash, mawk) (push) Failing after 1m32s
Tests: fast / fast (zsh, mawk) (push) Failing after 19m17s
Tests: installation_iojs / installation_iojs without curl (bash) (push) Failing after 1m33s
Tests: installation_iojs / actually compile io.js from source (gcc 4.9 container) (push) Failing after 29s
Tests: installation_node / installation_node (bash, without curl) (push) Failing after 22m35s
Tests: installation_node / installation_node (dash, without curl) (push) Failing after 1m51s
Tests: installation_node / installation_node (sh, without curl) (push) Failing after 33s
Tests: installation_node / installation_node (zsh, without curl) (push) Failing after 33s
Tests: xenial / xenial (zsh) (push) Failing after 1m40s
urchin tests / tests (bash, install_script) (push) Failing after 34s
urchin tests / tests (bash, slow) (push) Failing after 31m56s
urchin tests / tests (dash, sourcing) (push) Failing after 33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (10) (push) Failing after 34s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (12) (push) Failing after 33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (16) (push) Failing after 38s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (18) (push) Failing after 34s
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 (25) (push) Failing after 16m52s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (4.5) (push) Successful in 1m39s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (6) (push) Failing after 33s
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 with set -e / test (no nvmrc, HEAD, 1 shlvl) (push) Failing after 1m32s
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.5, 1 shlvl) (push) Failing after 32s
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.39.7, 2 shlvls) (push) Failing after 21s
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 (nvmrc, HEAD, 1 shlvl) (push) Failing after 16s
Tests: nvm install with set -e / test (nvmrc, v0.39.3, 2 shlvls) (push) Failing after 16s
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 (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.0, 1 shlvl) (push) Successful in 14s
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.5, 2 shlvls) (push) Failing after 21s
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.8, 1 shlvl) (push) Failing after 19s
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, 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 (script, 10, Ubuntu-24.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, Debian-13) (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, 16, Ubuntu-18.04) (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 (, 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, 14, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (, 12, Alpine-3.23) (push) Canceled after 0s
Tests: alpine / musl-binary arm64 (alpine 3.20, node v20.20.1) (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: fast / fast (WSL Ubuntu-24.04, bash) (push) Canceled after 0s
Tests: fast / fast (WSL Ubuntu-24.04, dash) (push) Canceled after 0s
Tests: alpine / fast x64 (alpine 3.15, sh) (push) Failing after 17m39s
Tests: alpine / musl-binary x64 (alpine 3.12, node v12.22.12) (push) Failing after 32s
Tests: fast / fast (zsh, gawk) (push) Failing after 3h1m5s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (0.10) (push) Failing after 2m33s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (19) (push) Failing after 34s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (21) (push) Successful in 1m27s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (3) (push) Failing after 26m11s
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.2, 1 shlvl) (push) Failing after 14s
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, v0.39.5, 1 shlvl) (push) Failing after 15s
Tests: nvm install with set -e / test (nvmrc, v0.40.3, 2 shlvls) (push) Failing after 13s
Tests on Windows: `nvm install` / WSL nvm install (, 16, Ubuntu-18.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 (, 11, 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, 14, Alpine-3.17) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.15, 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
2026-10-28 10:37:00 -07:00
Daniel OriyanandClaude Opus 5.5 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
2026-10-23 13:54:04 +03:00
Shuyun Yang 13eee46e7d [Fix] nvm_ls_cached: match dots in the version literally, and ignore a trailing dot
Tests: shellcheck / shellcheck_matrix (bash_completion, bash) (push) Failing after 8m55s
Tests: shellcheck / shellcheck_matrix (nvm.sh, bash) (push) Failing after 1m47s
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, bash) (push) Failing after 32s
Tests: alpine / fast x64 (alpine 3.15, dash) (push) Failing after 58s
Tests: alpine / musl-binary x64 (alpine 3.10, node v10.24.1) (push) Failing after 32s
Tests: alpine / musl-binary x64 (alpine 3.20, node v20.18.1) (push) Failing after 1m33s
Tests: fast / fast (bash, gawk) (push) Failing after 1m37s
Tests: fast / fast (dash, gawk) (push) Failing after 37s
Tests: installation_iojs / installation_iojs without curl (bash) (push) Failing after 1m37s
Tests: installation_node / installation_node (dash) (push) Failing after 2m42s
Tests: installation_node / all installation_node tests (push) Skipped
Tests: xenial / xenial (dash) (push) Failing after 31s
Tests: xenial / xenial (sh) (push) Failing after 32s
urchin tests / tests (bash, install_script) (push) Failing after 34s
urchin tests / tests (dash, sourcing) (push) Successful in 8m28s
urchin tests / tests (zsh, slow) (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.3, 2 shlvls) (push) Failing after 32s
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.7, 1 shlvl) (push) Failing after 12s
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.39.7, 2 shlvls) (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.2, 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.8, 1 shlvl) (push) Failing after 11s
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.2, 1 shlvl) (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.7, 1 shlvl) (push) Failing after 15s
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.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.4, 2 shlvls) (push) Failing after 15s
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: alpine / fast arm64 (alpine 3, dash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.15, dash) (push) Canceled after 0s
Tests: alpine / musl-binary arm64 (alpine 3, node v24.9.0) (push) Canceled after 0s
Tests: fast / fast (macOS, zsh) (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` / MSYS nvm install (--no-progress 10) (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-13) (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 (, 14, Debian-12) (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, Ubuntu-20.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-24.04) (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, 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, 16, Debian-12) (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 (script, 21, Ubuntu-20.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 (, 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 (, 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, 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, 16, Alpine-3.17) (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, 10, 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` / tests, on windows (push) Canceled after 0s
Tests: linting / eclint (push) Successful in 3m14s
Tests: linting / test_naming (push) Failing after 1m35s
Tests: linting / check_exec (push) Successful in 12m39s
Tests: release process / release (push) Successful in 3m38s
Tests: shellcheck / shellcheck_matrix (nvm-exec, bash) (push) Failing after 1m19s
Tests: alpine / fast x64 (alpine 3, zsh) (push) Failing after 33s
Tests: alpine / fast x64 (alpine 3.19, bash) (push) Failing after 32s
Tests: alpine / fast x64 (alpine 3.19, 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.15, node v14.21.3) (push) Failing after 14m12s
Tests: alpine / musl-binary x64 (alpine 3.16, node v16.20.2) (push) Failing after 14m16s
Tests: fast / fast (bash, mawk) (push) Failing after 32s
Tests: fast / fast (dash, mawk) (push) Failing after 33s
Tests: installation_iojs / installation_iojs without curl (zsh) (push) Failing after 59s
Tests: installation_node / installation_node (bash) (push) Failing after 34s
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 (zsh) (push) Failing after 33s
urchin tests / tests (bash, installation_iojs) (push) Failing after 32s
urchin tests / tests (dash, installation_iojs) (push) Failing after 3h6m11s
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.8, 2 shlvls) (push) Failing after 12s
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.40.1, 1 shlvl) (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.3, 1 shlvl) (push) Failing after 16s
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.39.6, 2 shlvls) (push) Failing after 12s
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.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.19, dash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, sh) (push) Canceled after 0s
Tests: fast / fast (macOS, dash) (push) Canceled after 0s
Tests: fast / fast (WSL Ubuntu-24.04, bash) (push) Canceled after 0s
Tests on Windows: `nvm install` / MSYS fail prefix nvm install (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, Ubuntu-20.04) (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 (, 16, Debian-12) (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-24.04) (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, 14, Debian-13) (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, 18, Debian-12) (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 (script, 21, Debian-13) (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 (, 11, 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 (, 21, 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, 12, 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, 18, Alpine-3.17) (push) Canceled after 0s
Tests: `nvm install-latest-npm` / nvm install-latest-npm (push) Skipped
Tests: linting / dockerfile_lint (push) Successful in 2m6s
Tests: linting / doctoc (push) Successful in 2m44s
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.sh, dash) (push) Failing after 2m1s
Tests: shellcheck / shellcheck_matrix (nvm.sh, ksh) (push) Failing after 3m49s
Tests: alpine / fast x64 (alpine 3.15, sh) (push) Failing after 32s
Tests: alpine / fast x64 (alpine 3.15, zsh) (push) Failing after 32s
Tests: alpine / musl-binary x64 (alpine 3.18, node v18.20.4) (push) Failing after 14m13s
Tests: fast / fast (sh, gawk) (push) Failing after 32s
Tests: installation_iojs / actually compile io.js from source (gcc 4.9 container) (push) Failing after 27s
Tests: installation_node / installation_node (bash, without curl) (push) Failing after 44s
Tests: xenial / xenial (bash) (push) Failing after 35s
urchin tests / tests (bash, slow) (push) Failing after 32m53s
urchin tests / tests (bash, sourcing) (push) Failing after 39s
urchin tests / tests (dash, slow) (push) Failing after 31m57s
urchin tests / tests (sh, installation_iojs) (push) Failing after 2m41s
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, HEAD, 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.40.2, 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.4, 2 shlvls) (push) Failing after 13s
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.40.0, 2 shlvls) (push) Failing after 32s
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.5, 2 shlvls) (push) Failing after 14s
Tests: nvm install with set -e / test (no nvmrc, v0.40.6, 1 shlvl) (push) Failing after 12s
Tests: alpine / fast arm64 (alpine 3, zsh) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.15, bash) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.15, sh) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.15, zsh) (push) Canceled after 0s
Tests: alpine / fast arm64 (alpine 3.19, zsh) (push) Canceled after 0s
Tests: fast / all fast tests (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 (, 14, Debian-13) (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, Debian-13) (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 (script, 10, Debian-13) (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, Ubuntu-18.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, Ubuntu-20.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, 16, Ubuntu-18.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 (, 12, 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 on Windows: `nvm install` / WSL nvm install (, 18, Alpine-3.17) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, 21, Alpine-3.17) (push) Canceled after 0s
Tests: `nvm install-latest-npm` / matrix (push) Failing after 17m53s
Tests: shellcheck / shellcheck_matrix (nvm.sh, sh) (push) Failing after 1m29s
Tests: shellcheck / shellcheck (push) Skipped
Tests: alpine / fast x64 (alpine 3.19, dash) (push) Failing after 32s
Tests: alpine / musl-binary x64 (alpine 3.12, node v12.22.12) (push) Failing after 14m35s
Tests: fast / fast (zsh, gawk) (push) Failing after 32s
Tests: fast / fast (sh, mawk) (push) Failing after 33s
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_iojs / all installation_iojs tests (push) Skipped
urchin tests / tests (sh, sourcing) (push) Failing after 32s
urchin tests / all test suites, all shells (push) Skipped
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 (nvmrc, v0.39.3, 2 shlvls) (push) Failing after 12s
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.40.4, 1 shlvl) (push) Failing after 11s
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, 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.40.2, 2 shlvls) (push) Failing after 13s
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.40.1, 1 shlvl) (push) Failing after 32s
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.7, 2 shlvls) (push) Failing after 11s
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, sh) (push) Canceled after 0s
Tests: alpine / musl-binary arm64 (alpine 3, node v22.21.1) (push) Canceled after 0s
Tests: alpine / all alpine tests (push) Canceled after 0s
Tests: fast / fast (macOS, bash) (push) Canceled after 0s
Tests: fast / fast (macOS, sh) (push) Canceled after 0s
Tests: fast / fast (WSL Ubuntu-24.04, dash) (push) Canceled after 0s
Tests on Windows: `nvm install` / MSYS nvm install (--lts) (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, Ubuntu-18.04) (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-24.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 (, 18, Debian-13) (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-18.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, 16, Ubuntu-20.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 (, 12, Alpine-3.23) (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 (script, 10, Alpine-3.17) (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, 21, Alpine-3.23) (push) Canceled after 0s
Code scanning - action / CodeQL-Build (push) Failing after 1m54s
Tests: alpine / fast x64 (alpine 3.19, sh) (push) Failing after 32s
Tests: alpine / musl-binary x64 (alpine 3.10, node v8.17.0) (push) Failing after 33s
Tests: fast / fast (zsh, mawk) (push) Failing after 34s
Tests: installation_node / installation_node (zsh, without curl) (push) Failing after 1m34s
Tests: xenial / all xenial tests (push) Skipped
urchin tests / tests (sh, slow) (push) Failing after 32s
urchin tests / tests (zsh, installation_iojs) (push) Failing after 33s
urchin tests / tests (zsh, sourcing) (push) Failing after 33s
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 (nvmrc, HEAD, 1 shlvl) (push) Failing after 13s
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 (nvmrc, v0.39.7, 2 shlvls) (push) Failing after 12s
Tests: alpine / fast arm64 (alpine 3.19, bash) (push) Canceled after 0s
Tests: alpine / musl-binary arm64 (alpine 3.20, node v20.20.1) (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 (, 16, Ubuntu-20.04) (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 (, 16, Alpine-3.23) (push) Canceled after 0s
Tests on Windows: `nvm install` / WSL nvm install (script, --lts, Alpine-3.17) (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.
2026-10-27 20:08:55 -07:00
NUAAwqyandCodex 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>
2026-10-27 16:28:52 -07:00
Jordan Harband 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.
2026-10-21 14:09:18 -07:00
Jordan Harband 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.
2026-10-21 13:09:25 -07:00
Jordan Harband 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.
2026-10-21 12:57:19 -07:00
Jordan Harband 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`.
2026-10-21 12:52:04 -07:00
Jordan Harband 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.
2026-10-26 11:11:53 -07:00
Jordan Harband 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.
2026-10-21 12:48:18 -07:00
Jordan Harband 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.
2026-10-21 12:47:13 -07:00
Jordan Harband 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.
2026-10-21 12:46:19 -07:00
Jordan Harband 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 *`.
2026-10-21 13:52:16 -07:00
Jordan Harband 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.
2026-10-21 12:44:44 -07:00
Jordan Harband 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.
2026-10-21 12:44:19 -07:00
Jordan Harband 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 `.`.
2026-10-21 12:43:37 -07:00
Jordan Harband 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`.
2026-10-21 12:40:42 -07:00
Jordan Harband 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".
2026-10-21 12:39:28 -07:00
Jordan Harband 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.
2026-10-21 12:39:00 -07:00
Jordan Harband 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.
2026-10-25 11:42:45 -07:00
Jordan Harband 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.
2026-10-23 08:53:59 -07:00
Jordan Harband 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.
2026-10-23 08:53:59 -07:00
Jordan Harband 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.
2026-10-23 08:53:59 -07:00
Jordan Harband 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.
2026-10-23 08:53:59 -07:00
Jordan Harband 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.
2026-10-23 08:53:59 -07:00