1
0
mirror of https://github.com/go-task/task.git synced 2025-11-29 22:48:03 +02:00

feat: dag reader

This commit is contained in:
Pete Davison
2024-01-01 23:12:28 +00:00
parent 1890722b75
commit a50580b5a1
6 changed files with 145 additions and 128 deletions

View File

@@ -63,8 +63,7 @@ func (e *Executor) getRootNode() (taskfile.Node, error) {
}
func (e *Executor) readTaskfile(node taskfile.Node) error {
var err error
e.Taskfile, err = taskfile.Read(
reader := taskfile.NewReader(
node,
e.Insecure,
e.Download,
@@ -73,9 +72,13 @@ func (e *Executor) readTaskfile(node taskfile.Node) error {
e.TempDir,
e.Logger,
)
graph, err := reader.Read()
if err != nil {
return err
}
if err := graph.Visualize("./taskfile-dag.gv"); err != nil {
return err
}
return nil
}