Skip to content

Commit

Permalink
add quotes for value on export command
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyBrito authored and cpuguy83 committed Feb 7, 2024
1 parent 612af5a commit a61b2e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/rpm/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func writeStep(b *strings.Builder, step dalec.BuildStep) {
// will be available to every command in the BuildStep
fmt.Fprintln(b, "(") // begin subshell
for _, k := range envKeys {
fmt.Fprintf(b, "export %s=%s\n", k, step.Env[k])
fmt.Fprintf(b, "export %s=\"%s\"\n", k, step.Env[k])
}
fmt.Fprintf(b, "%s", step.Command)
fmt.Fprintln(b, ")") // end subshell
Expand All @@ -260,7 +260,7 @@ func (w *specWrapper) BuildSteps() fmt.Stringer {
envKeys := dalec.SortMapKeys(t.Env)
for _, k := range envKeys {
v := t.Env[k]
fmt.Fprintf(b, "export %s=%s\n", k, v)
fmt.Fprintf(b, "export %s=\"%s\"\n", k, v)
}

for _, step := range t.Steps {
Expand Down

0 comments on commit a61b2e1

Please sign in to comment.