mirror of
https://github.com/go-task/task.git
synced 2025-11-25 22:32:55 +02:00
Bugfix: allow templating when calling deps
Fixes issue #42 by allowing for template evaluatation on task override variables when the task is launched as dependency.
This commit is contained in:
10
task.go
10
task.go
@@ -165,8 +165,16 @@ func (e *Executor) runDeps(ctx context.Context, call Call) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
depVars := make(Vars, len(d.Vars))
|
||||
for k, v := range d.Vars {
|
||||
v, err := e.ReplaceVariables(v, call)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
depVars[k] = v
|
||||
}
|
||||
|
||||
return e.RunTask(ctx, Call{Task: dep, Vars: d.Vars})
|
||||
return e.RunTask(ctx, Call{Task: dep, Vars: depVars})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user