SIGN IN SIGN UP
nvm-sh / nvm UNCLAIMED

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

0 0 80 Shell

[Fix] Reject bare LTS codenames in nvm install

Previously, `nvm install Argon` would succeed by matching the LTS name
in the version description (e.g., "v4.9.1 (Latest LTS: Argon)"), but
`nvm uninstall Argon` would fail because "Argon" is not a valid alias or not a valid version.

Changes:
- Added pattern matching check in nvm_remote_version (nvm.sh:785-791)
- Skips check for implicit aliases (node, stable, etc.) to preserve
  existing functionality
- Added unit tests to verify LTS names are rejected while version
  numbers still work
After this fix:
- `nvm install Argon` → fails (use `nvm install lts/argon` instead)
- `nvm install 4` → still works
- `nvm install node` → still works
- `nvm install lts/argon` → still works

This makes install and uninstall behavior consistent.

Fixes #3474.
R
Rahul Beniwal committed
81f13638d76e549072ec614d523e9cccfefd0ec9
Parent: 26066c1
Committed by Jordan Harband <ljharb@gmail.com> on 11/24/2025, 4:27:39 PM