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/ls.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ls.js')
-rw-r--r--lib/ls.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ls.js b/lib/ls.js
index 65b3ddfe7..56d657945 100644
--- a/lib/ls.js
+++ b/lib/ls.js
@@ -166,7 +166,10 @@ class LS extends BaseCommand {
)
}
- if (problems.size) {
+ const shouldThrow = problems.size &&
+ ![...problems].every(problem => problem.startsWith('extraneous:'))
+
+ if (shouldThrow) {
throw Object.assign(
new Error([...problems].join(EOL)),
{ code: 'ELSPROBLEMS' }