Fix to allow equals sign in value of environment variable

This commit is contained in:
DanHam 2016-12-28 00:33:16 +00:00
parent be0196492f
commit 0423f91037
No known key found for this signature in database
GPG Key ID: 58E79AEDD6AA987E
1 changed files with 1 additions and 1 deletions

View File

@ -347,7 +347,7 @@ func (p *Provisioner) createFlattenedEnvVars(elevated bool) (flattened string, e
// 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))