Skip to content
This repository has been archived by the owner on Nov 16, 2019. It is now read-only.

Commit

Permalink
include builtin sources entry from rootConf
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Oct 7, 2014
1 parent c21a79a commit 541aa7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions npmconf.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ function load_(builtin, rc, cli, cb) {
var conf = new Conf(rc)

conf.usingBuiltin = !!builtin
conf.sources.builtin = rc.sources.builtin
conf.add(cli, 'cli')
conf.addEnv()

Expand Down
6 changes: 5 additions & 1 deletion test/builtin.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ var expectSources =
{ path: common.globalconfig,
type: 'ini',
data: gcData },
builtin: { data: biData } }
builtin:
{ path: common.builtin,
type: 'ini',
data: biData }
}

test('with builtin', function (t) {
npmconf.load(cli, common.builtin, function (er, conf) {
Expand Down

0 comments on commit 541aa7d

Please sign in to comment.