From c1fc9cc3ef685a7b4b152d1acb7eae1f847a2362 Mon Sep 17 00:00:00 2001 From: Dotan Nahum Date: Wed, 15 May 2024 11:41:26 +0300 Subject: [PATCH] dont quote quoted --- teller-providers/src/providers/dotenv.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teller-providers/src/providers/dotenv.rs b/teller-providers/src/providers/dotenv.rs index 0f8cf385..eb7ef1f6 100644 --- a/teller-providers/src/providers/dotenv.rs +++ b/teller-providers/src/providers/dotenv.rs @@ -110,7 +110,7 @@ fn save(path: &Path, data: &BTreeMap) -> Result { }; let value = json_value.unwrap_or_else(|| v.to_string()); - if value.chars().any(char::is_whitespace) { + if value.chars().any(char::is_whitespace) && !value.starts_with(['"', '\'']) { out.push_str(&format!("{k}=\"{value}\"\n")); } else { out.push_str(&format!("{k}={value}\n"));