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
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2015-07-01 05:43:47 +0300
committerRebecca Turner <me@re-becca.org>2015-07-01 05:43:47 +0300
commit8c9fe9ce196c7f99b374ec5e45a1298e27b6d6e7 (patch)
tree23c4944f38f019b5b2c9bbb860d57c8cdaf45373 /lib/install.js
parent3228c20326a360680e1268b13af26d3ce126f39d (diff)
install: Guard against trying to save w/ an invalid package.json
Diffstat (limited to 'lib/install.js')
-rw-r--r--lib/install.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/install.js b/lib/install.js
index d2e1e6e42..afda8bae2 100644
--- a/lib/install.js
+++ b/lib/install.js
@@ -498,6 +498,7 @@ Installer.prototype.runTopLevelLifecycles = function (cb) {
Installer.prototype.saveToDependencies = function (cb) {
validate('F', arguments)
+ if (this.failing) return cb()
log.silly('install', 'saveToDependencies')
saveRequested(this.args, this.idealTree, cb)
}