Environment variable names are converted to lower case
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 265
- Avg merge
- 2h 42m
- Merged PRs (30d)
- 4
Description
Environment variable names are converted to lower case internally. This is surprising undocumented behavior. We want to be able to override values from a configuration file with environment variables. It would be natural to use the same spelling (not counting the prefix), but this doesn't work if the configuration file keys are upper case. To make it work, the configuration file keys must be lower case.
config.toml
FOO="You can't override me!"
bar="You can override me just fine."
In the shell
APP_FOO="Why are you ignoring me?" APP_BAR="Yay! New bar." ./target/debug/app
I was using TOML for the config file and bash for the shell, if it matters.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the environment-variable source and the configuration merge or key-normalization path, then reproduce the supplied config.toml and shell commands. Done means the behavior around upper-case configuration keys and matching environment variables is documented or corrected, with tests covering both upper- and lower-case keys.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100