mirror of
https://github.com/go-task/task.git
synced 2025-06-15 00:15:10 +02:00
Make dynamic variables run on the right directory
It was always running in the main Taskfile dir, even when the variable was declared in an included taskfile in another directory or when task had a custom dir. Closes #384
This commit is contained in:
@ -60,7 +60,7 @@ func (e *Executor) CompiledTask(call taskfile.Call) (*taskfile.Task, error) {
|
||||
new.Env.Merge(r.ReplaceVars(e.Taskfile.Env))
|
||||
new.Env.Merge(r.ReplaceVars(origTask.Env))
|
||||
err = new.Env.Range(func(k string, v taskfile.Var) error {
|
||||
static, err := e.Compiler.HandleDynamicVar(v)
|
||||
static, err := e.Compiler.HandleDynamicVar(v, new.Dir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user