Skip to content

'Env' Store is Loaded Twice #363

Description

@sploicers

Exactly as the title says - when I configure Nconf with the code below I can verify that Provider.prototype.add is called with the 'name' argument set to 'env' two times. This results in some of my environment variables getting clobbered and not ending up in the finally built store.

The following breakpoint (placed in provider.js of the Nconf source code) is what I used to demonstrate this:
image

The configuration that I'm using to reproduce this is:

nconf
.overrides(overrides)
.argv()
.env({
	separator: '__',
	parseValues: true,
	transform: transformer
})
.file(configFile)
.defaults(configDefaults);

I have verified that the block of code above is only hit once.

npm list nconf tells me I am on version 0.10.0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions