Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/arei/npmbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Glen R. Goodwin committed Oct 4, 2016
2 parents 990613d + d373d16 commit 9b8a4f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions npmboxxer.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@

if (!options.silent) console.log(" Querying "+packageName);

var packageType = npa(packageName).type;
var packageDetails = npa(packageName);
var packageType = packageDetails && packageDetails.type || null;

if(packageType==="git" || packageType==="hosted") {
npm.commands.cache.add(packageName,null,null,false,function(err, packageInfo) {
Expand All @@ -143,7 +144,7 @@

var found = Object.keys(deps).slice(-1)[0]; // we want the last entry.
if (found) {
var fullname = packageName.split(/@/g)[0] || packageName;
var fullname = packageDetails && packageDetails.name || packageName;
fullname += "@"+found;
results[fullname] = true;

Expand Down

0 comments on commit 9b8a4f6

Please sign in to comment.