-
Notifications
You must be signed in to change notification settings - Fork 37
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
Question: Conventions to overwrite nested values with env vars #103
Comments
|
Check out the docs for the Env provider.
Use You can also provide structured data as the top level key. APP_VAR={key="value",num=10} |
Thank you, @SergioBenitez, for your fast response, and sorry 🙏🏼 I did not see that. I try searching in the docs first but I did not find that. I should have made a bigger effort. Finally, I'm using a double underscore:
Thank you for sharing this crate! (and others). |
Hello, I'm migrating to Figment in one of the projects I'm contributing to.
I have this toml file:
And I want to overwrite this value
http_api.access_tokens.admin
with an env var:It seems that I can do it using this env var name:
TORRUST_TRACKER_HTTP_API.ACCESS_TOKENS.ADMIN
(prefixTORRUST_TRACKER_
), but that's not a valid var name in Bash.Any suggestion about how to solve this problem? I could solve it if there is a way to use a different separator, for example,
__
instead of.
.By the way,
http_api.access_tokens
is a dynamic dictionary (HashMap<String, String>
) but it looks that's not a problem. I was able to write a test with jail and overwrite the value. My problem is using that name in Bash.The text was updated successfully, but these errors were encountered: