mirror of
https://github.com/go-task/task.git
synced 2025-12-01 22:52:02 +02:00
feat: stdin node
This commit is contained in:
17
setup.go
17
setup.go
@@ -67,22 +67,19 @@ func (e *Executor) setCurrentDir() error {
|
||||
return err
|
||||
}
|
||||
e.Dir = wd
|
||||
} else {
|
||||
var err error
|
||||
e.Dir, err = filepath.Abs(e.Dir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Search for a taskfile
|
||||
root, err := taskfile.ExistsWalk(e.Dir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
e.Dir = filepath.Dir(root)
|
||||
e.Entrypoint = filepath.Base(root)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *Executor) readTaskfile() error {
|
||||
uri := filepath.Join(e.Dir, e.Entrypoint)
|
||||
node, err := taskfile.NewNode(uri, e.Insecure)
|
||||
node, err := taskfile.NewRootNode(e.Dir, e.Entrypoint, e.Insecure)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user