This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ pub fn load_config() -> anyhow::Result<EnvConfig> {
|
||||
}
|
||||
|
||||
pub fn try_get_env(key: &str) -> anyhow::Result<String> {
|
||||
let env = std::env::var(key)?;
|
||||
let env = std::env::var(key).map_err(|e| anyhow::anyhow!(format!("{}: {}", key, e)))?;
|
||||
|
||||
if env.trim().is_empty() {
|
||||
return Err(anyhow!(format!("env var {} is empty", key)));
|
||||
|
||||
Reference in New Issue
Block a user