Fix to allow equals in value of environment variable. Mirrors #4328

This commit is contained in:
DanHam 2017-01-18 18:11:20 +00:00 committed by Matthew Hooker
parent 0a46d883df
commit 49bc2e353f
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
1 changed files with 1 additions and 1 deletions

View File

@ -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