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
path: root/lib
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2015-08-19 16:05:22 +0300
committerRebecca Turner <me@re-becca.org>2015-08-21 22:26:46 +0300
commit02420dc73ae185144267912e461da2effe90341d (patch)
treef084d41972f206dbe80ff07f2276b8c1e5112493 /lib
parentad3714c2e52778c99c69c4be8e3beb350396708b (diff)
ls: Elminate warnings about missing package.json at top level
PR-URL: https://github.com/npm/npm/pull/9343 Fixes: #9113
Diffstat (limited to 'lib')
-rw-r--r--lib/ls.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ls.js b/lib/ls.js
index 8d5cd8087..c513e3b86 100644
--- a/lib/ls.js
+++ b/lib/ls.js
@@ -146,7 +146,8 @@ function getLite (data, noname) {
lite.problems.push('extraneous: ' + getPackageId(data) + ' ' + (data.path || ''))
}
- if (data.error && data.path !== path.resolve(npm.globalDir, '..')) {
+ if (data.error && data.path !== path.resolve(npm.globalDir, '..') &&
+ (data.error.code !== 'ENOENT' || noname)) {
lite.invalid = true
lite.problems = lite.problems || []
var message = data.error.message