mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-06-19 20:52:15 +08:00
Previously a number of subcommands dumped the entire `nvm --help` output (~100 lines) when arguments were missing or invalid, drowning the real error. Replace each dump with a short, command-specific usage block that names the expected syntax and points to `nvm --help` for full help. The exit code (127) is unchanged. Affected subcommands: - `nvm install` (no version + no .nvmrc) - `nvm use` (version unresolvable) - `nvm run` (no version + no .nvmrc) - `nvm which` (no version + no .nvmrc) - `nvm cache` (unknown subcommand) - `nvm uninstall` (wrong arg count) - `nvm unalias` (wrong arg count) - `nvm install-latest-npm` (wrong arg count) - `nvm reinstall-packages` / `nvm copy-packages` (wrong arg count) The catch-all unknown-subcommand handler still dumps full help, since in that case the user has no narrower context to be reminded about. Refs #3755
2.4 KiB
Executable File
2.4 KiB
Executable File