Skip to content

Commit

Permalink
Enclose exported environment variable values with quotes, fixes ddev#…
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalFrontiersMedia authored Mar 17, 2023
1 parent 5918d2c commit e99b4f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/ddevapp/provider.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package ddevapp

import (
"fmt"
"github.com/ddev/ddev/pkg/output"
"os"
"path"
"path/filepath"
"strings"

"fmt"

"github.com/ddev/ddev/pkg/fileutil"
"github.com/ddev/ddev/pkg/util"

Expand Down Expand Up @@ -438,8 +437,9 @@ func (p *Provider) Validate() error {
func (p *Provider) injectedEnvironment() string {
s := "true"
if len(p.EnvironmentVariables) > 0 {
s = "export "
s = "export"
for k, v := range p.EnvironmentVariables {
v = strings.Replace(v, " ", `\ `, -1)
s = s + fmt.Sprintf(" %s=%s ", k, v)
}
}
Expand Down

0 comments on commit e99b4f1

Please sign in to comment.