diff --git a/builtin/provisioners/local-exec/resource_provisioner.go b/builtin/provisioners/local-exec/resource_provisioner.go
index <HASH>..<HASH> 100644
--- a/builtin/provisioners/local-exec/resource_provisioner.go
+++ b/builtin/provisioners/local-exec/resource_provisioner.go
@@ -60,7 +60,6 @@ func applyFn(ctx context.Context) error {
 	environment := data.Get("environment").(map[string]interface{})
 
 	var env []string
-	env = make([]string, len(environment))
 	for k := range environment {
 		entry := fmt.Sprintf("%s=%s", k, environment[k].(string))
 		env = append(env, entry)
provisioner/local-exec: Support custom environment variables on Windows

Due to an incorrect slice allocation, the environment variable list was created with an empty string

element for each real element added.



It appears that this was silently ignored on Unix, but caused the following environment settings

to be ignored altogether on Windows.