From 7a058c1fc1bd227b21f4c32959e6e0d9304299bd Mon Sep 17 00:00:00 2001 From: Mike Lloyd Date: Mon, 22 Jan 2024 09:43:21 -0800 Subject: [PATCH] Quote shell variables --- src/types/renv.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/renv.rs b/src/types/renv.rs index c297ab6..cb1adf0 100644 --- a/src/types/renv.rs +++ b/src/types/renv.rs @@ -110,10 +110,10 @@ impl Renv { for v in &self.variables { let line = match shell_type { ShellType::Fish => { - format! {"set -x {} {}\n", v.name, v.value} + format! {"set -x {} '{}'\n", v.name, v.value} } ShellType::Bash | ShellType::Zsh => { - format! {"export {}={}\n", v.name, v.value} + format! {"export {}='{}'\n", v.name, v.value} } ShellType::Nu => { format! {"$env.{} = '{}'\n", v.name, v.value}