mirror of
https://github.com/go-task/task.git
synced 2025-11-29 22:48:03 +02:00
feat: iterators (#1798)
* feat: update to github.com/elliotchance/orderedmap/v3 * refactor: better sort package * feat: iterators * chore: remove unnecessary code
This commit is contained in:
@@ -187,7 +187,7 @@ func (r *Reader) include(node Node) error {
|
||||
var g errgroup.Group
|
||||
|
||||
// Loop over each included taskfile
|
||||
_ = vertex.Taskfile.Includes.Range(func(namespace string, include *ast.Include) error {
|
||||
for _, include := range vertex.Taskfile.Includes.All() {
|
||||
vars := compiler.GetEnviron()
|
||||
vars.Merge(vertex.Taskfile.Vars, nil)
|
||||
// Start a goroutine to process each included Taskfile
|
||||
@@ -264,8 +264,7 @@ func (r *Reader) include(node Node) error {
|
||||
}
|
||||
return err
|
||||
})
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
// Wait for all the go routines to finish
|
||||
return g.Wait()
|
||||
@@ -299,7 +298,7 @@ func (r *Reader) readNode(node Node) (*ast.Taskfile, error) {
|
||||
|
||||
// Set the taskfile/task's locations
|
||||
tf.Location = node.Location()
|
||||
for _, task := range tf.Tasks.Values() {
|
||||
for task := range tf.Tasks.Values(nil) {
|
||||
// If the task is not defined, create a new one
|
||||
if task == nil {
|
||||
task = &ast.Task{}
|
||||
|
||||
Reference in New Issue
Block a user