forked from slonk/bingus-blog
fix config env var
This commit is contained in:
parent
759a792043
commit
95cd0323a2
1 changed files with 5 additions and 2 deletions
|
@ -139,7 +139,10 @@ impl Default for CacheConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn load() -> Result<Config> {
|
pub async fn load() -> Result<Config> {
|
||||||
let config_file = env::var(format!("{}_CONFIG", env!("CARGO_BIN_NAME")))
|
let config_file = env::var(format!(
|
||||||
|
"{}_CONFIG",
|
||||||
|
env!("CARGO_BIN_NAME").to_uppercase().replace("-", "_")
|
||||||
|
))
|
||||||
.unwrap_or(String::from("config.toml"));
|
.unwrap_or(String::from("config.toml"));
|
||||||
match tokio::fs::OpenOptions::new()
|
match tokio::fs::OpenOptions::new()
|
||||||
.read(true)
|
.read(true)
|
||||||
|
|
Loading…
Reference in a new issue