Skip to content

Commit e99b4f1

Browse files
Enclose exported environment variable values with quotes, fixes ddev#3499 (ddev#4594)
1 parent 5918d2c commit e99b4f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/ddevapp/provider.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
package ddevapp
22

33
import (
4+
"fmt"
45
"github.com/ddev/ddev/pkg/output"
56
"os"
67
"path"
78
"path/filepath"
89
"strings"
910

10-
"fmt"
11-
1211
"github.com/ddev/ddev/pkg/fileutil"
1312
"github.com/ddev/ddev/pkg/util"
1413

@@ -438,8 +437,9 @@ func (p *Provider) Validate() error {
438437
func (p *Provider) injectedEnvironment() string {
439438
s := "true"
440439
if len(p.EnvironmentVariables) > 0 {
441-
s = "export "
440+
s = "export"
442441
for k, v := range p.EnvironmentVariables {
442+
v = strings.Replace(v, " ", `\ `, -1)
443443
s = s + fmt.Sprintf(" %s=%s ", k, v)
444444
}
445445
}

0 commit comments

Comments
 (0)