mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-11-30 20:44:01 +03:00
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.