diff options
author | isaacs <i@izs.me> | 2013-07-24 23:43:22 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-07-24 23:43:22 +0400 |
commit | 36a412d0eb065cdd1e916f6b001c098ff5c7efc3 (patch) | |
tree | 22a08ac56d659164eaea77bd2b04d904817b6ac9 | |
parent | ef6a53a50425b47ff227172ba7b621a1594e7f06 (diff) |
install: Replace warnings, reduce strictness
We need a more carefully considered approach here. For now
go back to what we had prior to 1.3
-rw-r--r-- | lib/install.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/install.js b/lib/install.js index 39d926721..9842a372f 100644 --- a/lib/install.js +++ b/lib/install.js @@ -162,7 +162,7 @@ function install (args, cb_) { // initial "family" is the name:version of the root, if it's got // a package.json file. var jsonFile = path.resolve(where, "package.json") - readJson(jsonFile, true, function (er, data) { + readJson(jsonFile, log.warn, function (er, data) { if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) @@ -238,6 +238,7 @@ function readDependencies (context, where, opts, cb) { var wrap = context ? context.wrap : null readJson( path.resolve(where, "package.json") + , log.warn , function (er, data) { if (er) return cb(er) @@ -499,7 +500,7 @@ function installManyTop (what, where, context, cb_) { if (context.explicit) return next() - readJson(path.join(where, "package.json"), true, function (er, data) { + readJson(path.join(where, "package.json"), log.warn, function (er, data) { if (er) return next(er) lifecycle(data, "preinstall", where, next) }) @@ -524,7 +525,7 @@ function installManyTop_ (what, where, context, cb) { asyncMap(pkgs.map(function (p) { return path.resolve(nm, p, "package.json") }), function (jsonfile, cb) { - readJson(jsonfile, function (er, data) { + readJson(jsonfile, log.warn, function (er, data) { if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) if (er) return cb(null, []) return cb(null, [[data.name, data.version]]) @@ -615,7 +616,7 @@ function targetResolver (where, context, deps) { }) asyncMap(inst, function (pkg, cb) { - readJson(path.resolve(nm, pkg, "package.json"), function (er, d) { + readJson(path.resolve(nm, pkg, "package.json"), log.warn, function (er, d) { if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) // error means it's not a package, most likely. if (er) return cb(null, []) @@ -734,7 +735,7 @@ function localLink (target, where, context, cb) { , "package.json" ) , parent = context.parent - readJson(jsonFile, function (er, data) { + readJson(jsonFile, log.warn, function (er, data) { if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) if (er || data._id === target._id) { if (er) { |