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:
authorisaacs <i@izs.me>2014-06-27 01:17:26 +0400
committerisaacs <i@izs.me>2014-06-27 01:22:51 +0400
commit56d9e5ce052dc5b96e65997ff88ca1944f707be1 (patch)
tree0eeed6297a398d97d40a29c3860fe63f47af6184
parentff5058d8e5797ebc53ed57398b0b81390bf6e2a2 (diff)
add verbose log when project config file is ignored
-rw-r--r--lib/npm.js12
1 files changed, 12 insertions, 0 deletions
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)