diff options
author | isaacs <i@izs.me> | 2011-10-08 04:19:18 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-10-08 04:19:18 +0400 |
commit | a7da3073773277d219a469b52fdfcf2f041eafee (patch) | |
tree | d749401a6a7afdbf643bdce77af9e7012fd33d06 /lib | |
parent | a5bbf487ee27255a97d0ac348b33eb692d2f6130 (diff) |
When installing npm, keep the builtin config
Diffstat (limited to 'lib')
-rw-r--r-- | lib/build.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/build.js b/lib/build.js index d453336e2..d20976793 100644 --- a/lib/build.js +++ b/lib/build.js @@ -50,6 +50,7 @@ function build_ (global, didPre, didRB) { return function (folder, cb) { chain ( [ !didPre && [lifecycle, pkg, "preinstall", folder] , [linkStuff, pkg, folder, global, didRB] + , pkg.name === "npm" && [writeBuiltinConf, folder] , didPre !== build._noLC && [lifecycle, pkg, "install", folder] , didPre !== build._noLC && [lifecycle, pkg, "postinstall", folder] , didPre !== build._noLC @@ -59,6 +60,11 @@ function build_ (global, didPre, didRB) { return function (folder, cb) { }) }} +function writeBuiltinConf (folder, cb) { + var ini = require("./utils/ini.js") + ini.saveConfig("builtin", cb) +} + function linkStuff (pkg, folder, global, didRB, cb) { // if it's global, and folder is in {prefix}/node_modules, // then bins are in {prefix}/bin |