Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't cache configs from env #266

Open
ignaciocavina opened this issue Jul 30, 2018 · 4 comments
Open

Don't cache configs from env #266

ignaciocavina opened this issue Jul 30, 2018 · 4 comments

Comments

@ignaciocavina
Copy link

Could we flag an env-based config so that it is forced to always be read over from then env variable it is tied to? Right now it seems it only reads it upon startup, and keeps it value forever. The use case for this is to change a config during execution.

@goldbergyoni
Copy link

Very useful for testing where you dynamically change config values to assert how the unit-under-test changes accordingly

@madarche
Copy link
Collaborator

If you could provide a failing test (like https://github.com/mozilla/node-convict/blob/master/test/validation-tests.js#L226) it would be easier to fix.

@A-312
Copy link
Contributor

A-312 commented Dec 7, 2019

Very useful for testing where you dynamically change config values to assert how the unit-under-test changes accordingly

Is very easy to do without : https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Object/assign

Object.assign(process.env, { a:1, n:2});

@A-312
Copy link
Contributor

A-312 commented Dec 7, 2019

If you could provide a failing test

Should be closed ? Not reproductible :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants