Cannot override enum values (other than string) via enviornment variables
Open
Nobody has claimed this yet.
A-env
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 265
- Avg merge
- 2h 42m
- Merged PRs (30d)
- 4
Description
Hello, thanks for all the great work on this library. It appears that it's currently not possible to override specific enum variables/values other than string:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: invalid type: string "1", expected usize', src/main.rs:36:58
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Here's a repro of the problem: https://github.com/mbellani/config-error-repro. Apologies in advance if this is something that already works and i just don't know how to use it.
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 with the linked config-error-repro and the failing conversion reported at src/main.rs:36:58. Trace how environment-variable strings are converted for enum fields, then verify that non-string enum values can be overridden without the reported invalid-type error.】【。
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100