fix(uninstall): use correct local prefix by jameschensmith · Pull Request #2930 · npm/cli (original) (raw)
Summary
A commit was made in v7.7.0, which removed references to flatOptions in favor of a more unified config. This caused a bug where this.npm.config.get('prefix') was using the global prefix.
This request corrects the non-global prefix path by using this.npm.localPrefix, a location already used throughout the repository (in the same file, in lib/prefix.js, etc.). Later, this value can be taken from the unified config library.
References
Fixes #2927.