Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2017-05-25 14:42:41 +0300
committerRebecca Turner <me@re-becca.org>2017-05-26 04:55:31 +0300
commit1112b9a87ec56dab3308eaf74bd14a1a48dd4acd (patch)
treeb023e6c2442f20c6f88b49e74fc1b42a3beb5fb3 /lib
parente6db6822588e11e309ce7f4c34ac4f7c7c5e678b (diff)
uninstall: defer arg clearing till after global dir is filtered
Diffstat (limited to 'lib')
-rw-r--r--lib/uninstall.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/uninstall.js b/lib/uninstall.js
index 71a2a158d..c181fdc4e 100644
--- a/lib/uninstall.js
+++ b/lib/uninstall.js
@@ -56,13 +56,14 @@ class Uninstaller extends Installer {
}
loadArgMetadata (next) {
- this.remove = this.args.map(function (arg) { return {name: arg} })
- this.args = []
+ this.args = this.args.map(function (arg) { return {name: arg} })
next()
}
loadAllDepsIntoIdealTree (cb) {
validate('F', arguments)
+ this.remove = this.args
+ this.args = []
log.silly('uninstall', 'loadAllDepsIntoIdealTree')
const saveDeps = getSaveType()