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
1 changed files with 1 additions and 1 deletions

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
// created.
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 {
return err
}