From 56d9e5ce052dc5b96e65997ff88ca1944f707be1 Mon Sep 17 00:00:00 2001 From: isaacs Date: Thu, 26 Jun 2014 14:17:26 -0700 Subject: add verbose log when project config file is ignored --- lib/npm.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/npm.js b/lib/npm.js index 7b9c54b07..34df1c233 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -311,6 +311,18 @@ function load (npm, cli, cb) { npm.config = config if (er) return cb(er) + // if the "project" config is not a filename, and we're + // not in global mode, then that means that it collided + // with either the default or effective userland config + if (!config.get("global") + && config.sources.project + && config.sources.project.type !== "ini") { + log.verbose("config" + , "Skipping project config: %s. " + + "(matches userconfig)" + , config.localPrefix + "/.npmrc") + } + // Include npm-version and node-version in user-agent var ua = config.get("user-agent") || "" ua = ua.replace(/\{node-version\}/gi, process.version) -- cgit v1.2.3