Merge pull request #5140 from hashicorp/dani/b-taskrunner

taskrunner: Persist environment from hooks
This commit is contained in:
Preetha 2019-01-03 09:30:52 -06:00 committed by GitHub
commit 8078cb79f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -218,9 +218,9 @@ func (tr *TaskRunner) prestart() error {
// Store the environment variables returned by the hook
if name == HookNameDevices {
tr.envBuilder.SetDeviceHookEnv(name, origHookState.Env)
tr.envBuilder.SetDeviceHookEnv(name, resp.Env)
} else {
tr.envBuilder.SetHookEnv(name, origHookState.Env)
tr.envBuilder.SetHookEnv(name, resp.Env)
}
// Store the resources