From a61b2e1378312207a787e98ecc229ba96555fe33 Mon Sep 17 00:00:00 2001 From: Danny Brito Date: Tue, 6 Feb 2024 18:34:32 +0000 Subject: [PATCH] add quotes for value on export command --- frontend/rpm/template.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/rpm/template.go b/frontend/rpm/template.go index 0cb25c46a..9b6326695 100644 --- a/frontend/rpm/template.go +++ b/frontend/rpm/template.go @@ -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 @@ -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 {