Fix AI review
Webhook action check before user check
This commit is contained in:
+3
-3
@@ -41,13 +41,13 @@ pub fn load_config() -> anyhow::Result<EnvConfig> {
|
||||
}
|
||||
|
||||
pub fn try_get_env(key: &str) -> anyhow::Result<String> {
|
||||
let env = std::env::var(key).map_err(|e| anyhow::anyhow!(format!("{}: {}", key, e)))?;
|
||||
let env_value = std::env::var(key).map_err(|e| anyhow::anyhow!("{}: {}", key, e))?;
|
||||
|
||||
if env.trim().is_empty() {
|
||||
if env_value.trim().is_empty() {
|
||||
return Err(anyhow!(format!("env var {} is empty", key)));
|
||||
}
|
||||
|
||||
Ok(env)
|
||||
Ok(env_value)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user