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:
authorThomas Michael McTiernan <thomasmctiernan@gmail.com>2015-09-22 23:53:40 +0300
committerRebecca Turner <me@re-becca.org>2015-10-09 02:24:36 +0300
commit508c6a44af1aaa631e89f6bd79c22c56cc11ab79 (patch)
tree0deddd887b061b69f3d8c1b61b9f85a60e863f94 /lib
parentf2cf05465bb9b5da6d2270cd140ac2198298df5a (diff)
deps: Treat lack of requirement name as failure to find it
Fixes #9669 PR-URL: https://github.com/npm/npm/pull/9715
Diffstat (limited to 'lib')
-rw-r--r--lib/install/deps.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/install/deps.js b/lib/install/deps.js
index 3a37f14c1..c55b434d4 100644
--- a/lib/install/deps.js
+++ b/lib/install/deps.js
@@ -88,7 +88,7 @@ function recalculateMetadata (tree, log, seen, next) {
function markDeps (spec, done) {
validate('SF', arguments)
realizePackageSpecifier(spec, packageRelativePath(tree), function (er, req) {
- if (er) return done()
+ if (er || !req.name) return done()
var child = findRequirement(tree, req.name, req)
if (child) {
resolveWithExistingModule(child, tree, log, andIgnoreErrors(done))