pass a copy of the task to the task environment

This commit is contained in:
Alex Dadgar 2016-05-05 22:01:17 -07:00
parent bc748de58a
commit 831909dcce

View file

@ -200,7 +200,7 @@ func (r *TaskRunner) setState(state string, event *structs.TaskEvent) {
// setTaskEnv sets the task environment. It returns an error if it could not be // setTaskEnv sets the task environment. It returns an error if it could not be
// created. // created.
func (r *TaskRunner) setTaskEnv() error { func (r *TaskRunner) setTaskEnv() error {
taskEnv, err := driver.GetTaskEnv(r.ctx.AllocDir, r.config.Node, r.task, r.alloc) taskEnv, err := driver.GetTaskEnv(r.ctx.AllocDir, r.config.Node, r.task.Copy(), r.alloc)
if err != nil { if err != nil {
return err return err
} }