Add support for .nvmrc lookup when running nvm use and no version is specified #1393
Replies: 2 comments 3 replies
|
We considered this before release and had mixed views. We're seeking community feedback, so I'm switching this to a discussion. Case For: ConvenienceObviously this would be convenient if you want to switch your default system version without knowing which version you're switching to. But how often are people doing this, and for what purposes? Case Against: Security/AwarenessScripts can manipulate .nvmrc files, which could allow an old compromised version to be configured as the default for the entire computer. An agent could specify a version with a known CVE/CWE, run By requiring a version in the command, users know which version they're configuring. The point is awareness. More importantly, logging Since this is a question of convenience and not function, we opted for the case against. Again though, we're open to community feedback. |
|
The case against is somewhat prevented by not allowing uninstalled versions and just throwing an error / warning if that versions has to be installed first, just like how actually specifying a uninstalled version would. With power comes responsibility and so on. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
When running
nvm usewithout a version parameter expected behaviour is that it will look in the .nvmrc file for a version-number to useAll reactions