fixed arrary logic
All checks were successful
Version Check / check-version (pull_request) Successful in 4s

This commit is contained in:
2026-03-18 17:35:07 +01:00
parent 277d8aa151
commit 30fd2d5d75
7 changed files with 198 additions and 187 deletions

View File

@@ -1,4 +1,4 @@
use super::{ConfigItem, FormatHandler, ItemStatus, ValueType};
use super::{ConfigItem, FormatHandler, ItemStatus, ValueType, PathSegment};
use std::fs;
use std::io::Write;
use std::path::Path;
@@ -18,9 +18,10 @@ impl FormatHandler for EnvHandler {
if let Some((key, val)) = line.split_once('=') {
let parsed_val = val.trim().trim_matches('"').trim_matches('\'').to_string();
let key_str = key.trim().to_string();
vars.push(ConfigItem {
key: key.trim().to_string(),
path: key.trim().to_string(),
key: key_str.clone(),
path: vec![PathSegment::Key(key_str)],
value: Some(parsed_val.clone()),
template_value: Some(parsed_val.clone()),
default_value: Some(parsed_val),
@@ -116,7 +117,7 @@ mod tests {
let file = NamedTempFile::new().unwrap();
let vars = vec![ConfigItem {
key: "KEY1".to_string(),
path: "KEY1".to_string(),
path: vec![PathSegment::Key("KEY1".to_string())],
value: Some("value1".to_string()),
template_value: None,
default_value: None,