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

Environment variable ignored when set to own value #1

Closed
MitMaro opened this issue Jul 29, 2016 · 2 comments
Closed

Environment variable ignored when set to own value #1

MitMaro opened this issue Jul 29, 2016 · 2 comments

Comments

@MitMaro
Copy link
Contributor

MitMaro commented Jul 29, 2016

Problem

When an environment variable is given it's name as a value, configly ignores the environment variable. I would expect the environment variable to always be used, no matter the value.

Test Case

config/custom-environment-variables.js

'use strict';
module.exports = {
    value: 'VALUE'
};

config/default.js

'use strict';
module.exports = {
    value: 'FOO'
};

index.js

'use strict';
console.log(require('configly')().value);

Test case repository

Run

$ node index.js
FOO
$ VALUE=bar node index.js
bar
$ # expected output VALUE
$ VALUE=VALUE node index.js
FOO
@alexindigo
Copy link
Owner

Hey, thank you for your interest
and for the cool bug report.

I'll definitely look into this :)

alexindigo added a commit that referenced this issue Jul 30, 2016
#1 Fixed env variables issue (value === name)
@alexindigo
Copy link
Owner

Published v4.0.2https://www.npmjs.com/package/configly
Thank you for the report.

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

2 participants