diff options
author | isaacs <i@izs.me> | 2010-08-25 01:49:39 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-08-25 16:21:50 +0400 |
commit | 9cde9608132aa73806943622bcba05f463e99d30 (patch) | |
tree | c1100a38ef65f07d929bdd67f14880efeb882988 | |
parent | a68a7056e62632e24b389eab68b7c88c302e8bb6 (diff) |
Load the default bins and whatnot in activate
-rw-r--r-- | lib/activate.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/activate.js b/lib/activate.js index 8f922888a..9a83cac27 100644 --- a/lib/activate.js +++ b/lib/activate.js @@ -18,6 +18,7 @@ var mkdir = require("./utils/mkdir-p") , shimIfExists = require("./utils/write-shim").ifExists , semver = require("./utils/semver") , asyncMap = require("./utils/async-map") + , loadPackageDefaults = require("./utils/load-package-defaults") module.exports = activate @@ -27,6 +28,7 @@ function activate (args, cb) { // first, link .npm/{pkg}/{version} to .npm/{pkg}/{active} // then, link the things in the root without a version to the active one. asyncMap(args, preActivate, function (er, data) { + log.silly(args, "preActivate over") if (er) return cb(er) asyncMap(data, activate_, 4, function (er) { if (er) return cb(er) @@ -85,13 +87,19 @@ function preActivate (arg, cb) { data.version = version data._id = data.name + "-" + data.version npm.set(data) - lifecycle(data, "preactivate", function (er) { cb(er, data) }) + loadPackageDefaults(data, function (er, data) { + if (er) return cb(er) + log.silly(data._id, "defaults loaded") + lifecycle(data, "preactivate", function (er) { cb(er, data) }) + }) }) } ) } function linkBins (pkg, cb) { + log.verbose(pkg._id, "activate linkBins") + log.silly(pkg.bin, "activate linkBins") var binroot = npm.config.get('binroot') if (!pkg.bin || !binroot) return cb() asyncMap(Object.keys(pkg.bin), function (i, cb) { |