Skip to content

Commit

Permalink
Quote shell variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Lloyd committed Jan 22, 2024
1 parent 8a5ef9a commit 7a058c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/types/renv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 7a058c1

Please sign in to comment.