parse flags from env blocks patch

This commit is contained in:
2026-09-10 17:47:32 +03:00
parent ebe134aa90
commit c13fbb6312

View File

@ -58,10 +58,17 @@ fn parse_env_vars(content: &str) -> HashMap<String, String> {
.lines()
.filter_map(|line| {
let line = line.trim();
if line.is_empty() || line.starts_with('#') { return None }
if line.is_empty() || line.starts_with('#') {
return None;
}
let parts: Vec<&str> = line.splitn(2, '=').collect();
if parts.len() != 2 { return None }
Some((parts[0].to_string(), parts[1].to_string()))
match parts.len() {
2 => Some((parts[0].to_string(), parts[1].to_string())),
1 => Some((parts[0].to_string(), String::new())),
_ => None,
}
})
.collect()
}