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

Cannot use embedded value in config #136

Closed
aliksend opened this issue Oct 31, 2017 · 3 comments
Closed

Cannot use embedded value in config #136

aliksend opened this issue Oct 31, 2017 · 3 comments

Comments

@aliksend
Copy link
Contributor

Hi

I use configuration with node-config but not with db field but with postgres.url field and when I run pg-migrate --config-value postgres.url up I have message The $DATABASE_URL environment variable is not set.. But when I try to use (for example) --config-value abc with database url it is working properly. So problem is that I cannot use embedded values from config.
Is I do something wrong or it is real issue?

Thank you for your product

aliksend added a commit to aliksend/node-pg-migrate that referenced this issue Oct 31, 2017
It is a hot fix, may be other checks needed and tests is also needed, but it is working
@dolezel
Copy link
Contributor

dolezel commented Nov 3, 2017

Strange it does not work for you. Which version of config do you use?
But your solution also works, so OK :)

dolezel pushed a commit that referenced this issue Nov 3, 2017
It is a hot fix, may be other checks needed and tests is also needed, but it is working
@dolezel dolezel closed this as completed Nov 3, 2017
@aliksend
Copy link
Contributor Author

aliksend commented Nov 3, 2017

It isn't woking because for a = { b: { c: 1 }} a.b.c (same as a['b']['c']) will be 1 but a['b.c'] will be undefined. And config.get('b.c') recursively reveals the property name and it is working

@dolezel
Copy link
Contributor

dolezel commented Nov 3, 2017

👍 True! Thanks!

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