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

Unset envvar subs dont overwrite with nils #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ddillinger
Copy link

Although I didn't need this for the thing I wanted the original feature for, it occurred to me while using it that there's certainly a use case for overriding an existing default via environment, and the first implementation couldn't do that. If you didn't set the envvar, it always returned nil for the config coordinates, even if you had something set there in the file on disk.

Also, I got to use paredit-convolute-sexp while tweaking the tests, which means I am having a spectacular morning already.

Dan Dillinger added 2 commits November 22, 2016 10:09
If the envvar is unset, System/getenv returns a nil, which was being
assoc'd in place. So you couldn't actually have a default in config,
that you *optionally* override with an envvar. It'd just always be nil.

This changes that so that if the envvar is unset, it won't assoc to the
location; if a key did exist there it will now return.
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

Successfully merging this pull request may close these issues.

1 participant