diff --git a/cuddle/src/cli/subcommands/folder.rs b/cuddle/src/cli/subcommands/folder.rs index c13a6d1..a67e2f2 100644 --- a/cuddle/src/cli/subcommands/folder.rs +++ b/cuddle/src/cli/subcommands/folder.rs @@ -151,12 +151,12 @@ fn filter_by_prefix(variables: Vec) -> impl Function { }) .collect::>(); - tracing::info!("was here"); - let mut structure: HashMap = HashMap::new(); for var in vars { - tracing::info!("found: {} - {}", &var.name, &var.value); - structure.insert(var.name, var.value); + if !structure.contains_key(&var.name) { + tracing::info!("found: {} - {}", &var.name, &var.value); + structure.insert(var.name, var.value); + } } Ok(serde_json::to_value(structure).unwrap())