diff options
-rw-r--r-- | lib/rebuild.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/rebuild.js b/lib/rebuild.js index 6ba11680e..a158e1132 100644 --- a/lib/rebuild.js +++ b/lib/rebuild.js @@ -21,6 +21,8 @@ function rebuild (args, cb) { var set = filter(data, args) , folders = Object.keys(set) if (!folders.length) return cb() + log(folders, "rebuild folders") + log(folders, "rebuild set") asyncMap(folders, npm.commands.build, function (er) { if (er) return cb(er) folders.forEach(function (f) { @@ -36,7 +38,7 @@ function filter (data, args, set) { if (set.hasOwnProperty(data.path)) return set var pass if (!args.length) pass = true // rebuild everything - else if (data.name) { + else if (data.name && data._id) { for (var i = 0, l = args.length; i < l; i ++) { var arg = args[i] , nv = arg.split("@") @@ -48,7 +50,8 @@ function filter (data, args, set) { break } } - if (pass) { + if (pass && data._id) { + log.verbose([data.path, data._id], "path id") set[data.path] = data._id } // need to also dive through kids, always. |