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:
7
setup.go
7
setup.go
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user