-
Notifications
You must be signed in to change notification settings - Fork 251
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
Add support for nested configs via env #49
Conversation
@@ -183,7 +183,7 @@ Memory.prototype.merge = function (key, value) { | |||
} | |||
|
|||
return Object.keys(value).every(function (nested) { | |||
return self.merge(fullKey + ':' + nested, value[nested]); | |||
return self.merge(common.key(fullKey, nested), value[nested]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was just so that the only place where the :
character is referenced is in common - plus, it seems like the right thing to do
Nice! I approve. @pksunkara Can you run tests and merge on this? I'm about to hit the hay. |
Add support for nested configs via env
@pksunkara @jesusabdullah @mhart This introduced a pretty serious regression in #65. Be more careful in the future |
I really have no idea how this issue is at all related to #65, but the irony of telling people to Be more careful in the future is not lost on me. |
This allows you to use nested config keys from env variables by specifying a custom separator (I believe this isn't currently possible because you can't use the
:
character in env variable names).