diff options
author | isaacs <i@izs.me> | 2011-03-11 12:42:25 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-03-22 01:56:02 +0300 |
commit | 6fbe9882271a6ca1e2fe6a44b9a2bbef9eeed95b (patch) | |
tree | 623f1c1c13a9b9d88f9a15355107f5d3279eddf4 | |
parent | e0328481d964c5b4a8d7a9c693a72d4fd5a46f08 (diff) |
don't rebuild if not a package
-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. |