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