From cd38e14ce4caa19fe3f5e4f0967ab6ffd543cf05 Mon Sep 17 00:00:00 2001 From: BennyWaitWhat Date: Wed, 29 Apr 2026 08:32:20 -0400 Subject: [PATCH] Rename `delimeter` -> `delimiter` in env_vars and external_secrets Fixes a misspelled identifier across two modules: - `app/src/env_vars/mod.rs`: `delimeter` parameter and uses (5x) and one comment. - `app/src/external_secrets/mod.rs`: `WARP_SECRET_DELIMETER` constant name (3x). The string literal value `"/warp-secret-delimeter/"` in external_secrets is intentionally preserved - it is the runtime separator passed to lpass via `--format` and parsed back from its output, so changing the value would break secret enumeration. Only the constant identifier is renamed. All call sites of `export_variables(...)` use positional arguments, so the parameter rename has no effect on callers. --- app/src/env_vars/mod.rs | 12 ++++++------ app/src/external_secrets/mod.rs | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/env_vars/mod.rs b/app/src/env_vars/mod.rs index b8e14379f..d19846099 100644 --- a/app/src/env_vars/mod.rs +++ b/app/src/env_vars/mod.rs @@ -136,8 +136,8 @@ impl EnvVarCollection { self.vars.iter().map(|var| (var.name.as_str(), &var.value)) } - pub fn export_variables(&self, delimeter: &str, shell_family: ShellFamily) -> String { - serialize_variables_internal(self.key_value_iter(), "", "=", "", delimeter, shell_family) + pub fn export_variables(&self, delimiter: &str, shell_family: ShellFamily) -> String { + serialize_variables_internal(self.key_value_iter(), "", "=", "", delimiter, shell_family) } pub fn export_variables_for_shell(&self, shell_type: ShellType) -> String { @@ -264,17 +264,17 @@ pub fn serialize_variables_for_shell<'s, I: IntoIterator>( pairs: I, prefix: &str, separator: &str, postfix: &str, - delimeter: &str, + delimiter: &str, shell_family: ShellFamily, ) -> String { pairs @@ -290,5 +290,5 @@ fn serialize_variables_internal<'s, I: IntoIterator = { vec![ "lpass".to_owned(), "ls".to_owned(), - format!("--format=%an{}%ai", *WARP_SECRET_DELIMETER), + format!("--format=%an{}%ai", *WARP_SECRET_DELIMITER), ] }; } @@ -320,7 +320,7 @@ fn parse_lastpass_secrets(output: &str) -> anyhow::Result> { let parsed_output: Vec = output .lines() .filter_map(|line| { - let parts = line.split(*WARP_SECRET_DELIMETER).collect_vec(); + let parts = line.split(*WARP_SECRET_DELIMITER).collect_vec(); if parts.len() == 2 && !parts[0].is_empty() && !parts[1].is_empty() { Some(ExternalSecret::LastPass(LastPassSecret { name: parts[0].to_owned(),