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.
This commit is contained in:
parent
ab6240afb0
commit
de43f01d65
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue