aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/lib/install.js
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2017-01-12 16:58:10 -0800
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2017-01-26 10:56:33 -0500
commitf73bc91756373f4057b3fc139dc5968049fa8c2a (patch)
tree054d2dc51e9e0950542dae62569ea1aacaf8a015 /deps/npm/lib/install.js
parentbfd3c7e626306cc5793618da2b56d37df338eb05 (diff)
downloadandroid-node-v8-f73bc91756373f4057b3fc139dc5968049fa8c2a.tar.gz
android-node-v8-f73bc91756373f4057b3fc139dc5968049fa8c2a.tar.bz2
android-node-v8-f73bc91756373f4057b3fc139dc5968049fa8c2a.zip
deps: upgrade npm to 4.1.1
PR-URL: https://github.com/nodejs/node/pull/10781 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/lib/install.js')
-rw-r--r--deps/npm/lib/install.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js
index 0cf6a2b2d6..1b0601d9f4 100644
--- a/deps/npm/lib/install.js
+++ b/deps/npm/lib/install.js
@@ -114,6 +114,7 @@ var unlock = locker.unlock
var ls = require('./ls.js')
var parseJSON = require('./utils/parse-json.js')
var output = require('./utils/output.js')
+var saveMetrics = require('./utils/metrics.js').save
// install specific libraries
var copyTree = require('./install/copy-tree.js')
@@ -216,9 +217,14 @@ function Installer (where, dryrun, args) {
}
Installer.prototype = {}
-Installer.prototype.run = function (cb) {
+Installer.prototype.run = function (_cb) {
validate('F', arguments)
+ var cb = function (err) {
+ saveMetrics(!err)
+ return _cb.apply(this, arguments)
+ }
+
// FIXME: This is bad and I should feel bad.
// lib/install needs to have some way of sharing _limited_
// state with the things it calls. Passing the object is too