diff options
author | isaacs <i@izs.me> | 2020-11-17 04:17:25 +0300 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2020-11-17 22:38:17 +0300 |
commit | bc9afb195f5aad7c06bc96049c0f00dc8e752dee (patch) | |
tree | 57f1631b485b4f303146f3fc1ae8306c0be35862 /lib/uninstall.js | |
parent | 4e522fdc917bc85af2ca8ff7669a0178e2f35123 (diff) |
Preserve builtin conf when installing npm globally
When a file named 'npmrc' is in the root of the npm module that is
currently running, it adds config values that override the defaults (but
not the global or user configs).
This is a way for a system package installer to tell the npm that it
installs to put its globals somewhere other than the default. In order
to keep these configs around when users self-update npm with `npm i -g
npm`, these config values must be "sticky", and ride along into the
newly globally installed npm.
This commit restores this behavior, fixing self-updating npm for Windows
users, and any other systems that may make use of this functionality.
Fixes: #2002
PR-URL: https://github.com/npm/cli/pull/2184
Credit: @isaacs
Close: #2184
Reviewed-by: @ruyadorno
Diffstat (limited to 'lib/uninstall.js')
-rw-r--r-- | lib/uninstall.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/uninstall.js b/lib/uninstall.js index ec997ae64..dbaa992f5 100644 --- a/lib/uninstall.js +++ b/lib/uninstall.js @@ -5,7 +5,7 @@ const npm = require('./npm.js') const rpj = require('read-package-json-fast') const { resolve } = require('path') const usageUtil = require('./utils/usage.js') -const reifyOutput = require('./utils/reify-output.js') +const reifyFinish = require('./utils/reify-finish.js') const cmd = (args, cb) => rm(args).then(() => cb()).catch(cb) @@ -32,7 +32,7 @@ const rm = async args => { ...npm.flatOptions, rm: args, }) - reifyOutput(arb) + await reifyFinish(arb) } const usage = usageUtil( |