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

ConfigSource.fromSystemEnv fails when env has variables leading with _ and you are using keyDelimiter "_" #1228

Open
aappddeevv opened this issue Jul 25, 2023 · 0 comments

Comments

@aappddeevv
Copy link

aappddeevv commented Jul 25, 2023

3.0.7 but if there is anything similar in the new one, there could still be an issue.

The fix I found was to use ConfigSource.fromMap(sys.env.filter((k,v) => !k.startsWith("_"), keyDelimiter=Option('_"))

My environment had vars like _ and those starting with _ and that seem to stop env map parsing.

I'm not sure there is any good solution to this other than to check for the key delimiter at the start of an env variable and ignore it or add a flag....everything makes this much more complex for the library so maybe its a documentation issue.

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

1 participant