mirror of
https://github.com/kemko/nomad.git
synced 2026-01-10 12:25:42 +03:00
taskrunner: Persist environment from hooks
https://github.com/hashicorp/nomad/pull/5032 introduced a regression where the origHookState was used in place of the response from the hook.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user