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
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-03-11 12:42:25 +0300
committerisaacs <i@izs.me>2011-03-22 01:56:02 +0300
commit6fbe9882271a6ca1e2fe6a44b9a2bbef9eeed95b (patch)
tree623f1c1c13a9b9d88f9a15355107f5d3279eddf4 /lib/rebuild.js
parente0328481d964c5b4a8d7a9c693a72d4fd5a46f08 (diff)
don't rebuild if not a package
Diffstat (limited to 'lib/rebuild.js')
-rw-r--r--lib/rebuild.js7
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.