mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-11-25 18:23:46 +03:00
These also ran npm in `$PWD`, applying the untrusted project `.npmrc`. npm v7 through v8.2 apply it even with `-g`, so its `registry` chose where `nvm install-latest-npm`, `--latest-npm`, `default-packages`, and `reinstall-packages` downloaded globally-installed packages from, and their install scripts then ran. npm v8.11 through v10.5 honor its `logs-dir` and `cache` for `npm --version`, so every non-silent `nvm use` created those directories and wrote a debug log there. Use `nvm_npm`, or `nvm_cd_root` where `xargs` runs npm. `npm link` still runs in each linked package's own directory.