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
path: root/lib
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-10-08 04:19:18 +0400
committerisaacs <i@izs.me>2011-10-08 04:19:18 +0400
commita7da3073773277d219a469b52fdfcf2f041eafee (patch)
treed749401a6a7afdbf643bdce77af9e7012fd33d06 /lib
parenta5bbf487ee27255a97d0ac348b33eb692d2f6130 (diff)
When installing npm, keep the builtin config
Diffstat (limited to 'lib')
-rw-r--r--lib/build.js6
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