Fix to allow equals in value of environment variable. Mirrors #4328
This commit is contained in:
parent
0a46d883df
commit
49bc2e353f
|
@ -301,7 +301,7 @@ func (p *Provisioner) createFlattenedEnvVars() (flattened string, err error) {
|
|||
|
||||
// Split vars into key/value components
|
||||
for _, envVar := range p.config.Vars {
|
||||
keyValue := strings.Split(envVar, "=")
|
||||
keyValue := strings.SplitN(envVar, "=", 2)
|
||||
if len(keyValue) != 2 || keyValue[0] == "" {
|
||||
err = errors.New(fmt.Sprintf("Shell provisioner environment variables must be in key=value format. Currently it is '%s'", envVar))
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue