allow accepting CONDUWUIT_
prefixed config options
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
894902b75f
commit
1da3048bb8
1 changed files with 10 additions and 1 deletions
|
@ -368,12 +368,21 @@ impl Config {
|
|||
Figment::new()
|
||||
.merge(Toml::file(config_file_env).nested())
|
||||
.merge(Env::prefixed("CONDUIT_").global())
|
||||
.merge(Env::prefixed("CONDUWUIT_").global())
|
||||
} else if let Some(config_file_arg) = Env::var("CONDUWUIT_CONFIG") {
|
||||
Figment::new()
|
||||
.merge(Toml::file(config_file_arg).nested())
|
||||
.merge(Env::prefixed("CONDUIT_").global())
|
||||
.merge(Env::prefixed("CONDUWUIT_").global())
|
||||
} else if let Some(config_file_arg) = path {
|
||||
Figment::new()
|
||||
.merge(Toml::file(config_file_arg).nested())
|
||||
.merge(Env::prefixed("CONDUIT_").global())
|
||||
.merge(Env::prefixed("CONDUWUIT_").global())
|
||||
} else {
|
||||
Figment::new().merge(Env::prefixed("CONDUIT_").global())
|
||||
Figment::new()
|
||||
.merge(Env::prefixed("CONDUIT_").global())
|
||||
.merge(Env::prefixed("CONDUWUIT_").global())
|
||||
};
|
||||
|
||||
let config = match raw_config.extract::<Config>() {
|
||||
|
|
Loading…
Add table
Reference in a new issue