diff --git a/provisioner/shell/provisioner.go b/provisioner/shell/provisioner.go index 0dcafa7a7..9553d47fd 100644 --- a/provisioner/shell/provisioner.go +++ b/provisioner/shell/provisioner.go @@ -171,7 +171,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error { // Do a check for bad environment variables, such as '=foo', 'foobar' for _, kv := range p.config.Vars { - vs := strings.Split(kv, "=") + vs := strings.SplitN(kv, "=", 2) if len(vs) != 2 || vs[0] == "" { errs = packer.MultiErrorAppend(errs, fmt.Errorf("Environment variable not in format 'key=value': %s", kv))