1
0
mirror of https://github.com/go-task/task.git synced 2025-11-23 22:24:45 +02:00

fix: orderedmap race condition (#1972)

This commit is contained in:
Pete Davison
2024-12-30 17:58:45 +00:00
committed by GitHub
parent 2965841eb7
commit fd3532812e
5 changed files with 166 additions and 68 deletions

View File

@@ -140,11 +140,11 @@ func ReplaceVarsWithExtra(vars *ast.Vars, cache *Cache, extra map[string]any) *a
return nil
}
var newVars ast.Vars
newVars := ast.NewVars()
_ = vars.Range(func(k string, v ast.Var) error {
newVars.Set(k, ReplaceVarWithExtra(v, cache, extra))
return nil
})
return &newVars
return newVars
}