mirror of
https://github.com/go-task/task.git
synced 2025-01-24 05:17:21 +02:00
fix: advanced import resolving dynamic variables incorrectly
This commit is contained in:
parent
fb9f6c20ab
commit
1d230af90d
@ -89,16 +89,16 @@ func (tfg *TaskfileGraph) Merge() (*Taskfile, error) {
|
||||
// Handle advanced imports
|
||||
// i.e. where additional data is given when a Taskfile is included
|
||||
if include.AdvancedImport {
|
||||
predecessorVertex.Taskfile.Vars.Range(func(k string, v Var) error {
|
||||
vertex.Taskfile.Vars.Range(func(k string, v Var) error {
|
||||
o := v
|
||||
o.Dir = include.Dir
|
||||
predecessorVertex.Taskfile.Vars.Set(k, o)
|
||||
vertex.Taskfile.Vars.Set(k, o)
|
||||
return nil
|
||||
})
|
||||
predecessorVertex.Taskfile.Env.Range(func(k string, v Var) error {
|
||||
vertex.Taskfile.Env.Range(func(k string, v Var) error {
|
||||
o := v
|
||||
o.Dir = include.Dir
|
||||
predecessorVertex.Taskfile.Env.Set(k, o)
|
||||
vertex.Taskfile.Env.Set(k, o)
|
||||
return nil
|
||||
})
|
||||
for _, task := range vertex.Taskfile.Tasks.Values() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user