mirror of
https://github.com/go-task/task.git
synced 2026-06-27 22:54:26 +00:00
feat: better taskfile cycle error handling
This commit is contained in:
@@ -153,6 +153,12 @@ func (r *Reader) include(node Node) error {
|
||||
Namespaces: []string{namespace, edge.Properties.Data.(*ast.Include).Namespace},
|
||||
}
|
||||
}
|
||||
if errors.Is(err, graph.ErrEdgeCreatesCycle) {
|
||||
return errors.TaskfileCycleError{
|
||||
Source: node.Location(),
|
||||
Destination: includeNode.Location(),
|
||||
}
|
||||
}
|
||||
return err
|
||||
})
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user