fix: interpolate dynamic vars in defer (#1818)

This commit is contained in:
Valentin Maerten
2024-09-19 14:22:39 +02:00
committed by GitHub
parent 56f3735b38
commit 5eaf0b2dcd
3 changed files with 9 additions and 5 deletions

View File

@@ -330,7 +330,7 @@ func (e *Executor) runDeferred(t *ast.Task, call *ast.Call, i int, deferredExitC
}
cmd := t.Cmds[i]
vars, _ := e.Compiler.FastGetVariables(origTask, call)
vars, _ := e.Compiler.GetVariables(origTask, call)
cache := &templater.Cache{Vars: vars}
extra := map[string]any{}