1
0
mirror of https://github.com/go-task/task.git synced 2025-11-23 22:24:45 +02:00

Merge branch 'master' into v3

This commit is contained in:
Andrey Nering
2019-08-11 23:03:58 -03:00
7 changed files with 62 additions and 27 deletions

24
task.go
View File

@@ -32,14 +32,16 @@ const (
// Executor executes a Taskfile
type Executor struct {
Taskfile *taskfile.Taskfile
Dir string
Force bool
Watch bool
Verbose bool
Silent bool
Dry bool
Summary bool
Color bool
Dir string
Entrypoint string
Force bool
Watch bool
Verbose bool
Silent bool
Dry bool
Summary bool
Color bool
Stdin io.Reader
Stdout io.Writer
@@ -86,8 +88,12 @@ func (e *Executor) Run(ctx context.Context, calls ...taskfile.Call) error {
// Setup setups Executor's internal state
func (e *Executor) Setup() error {
if e.Entrypoint == "" {
e.Entrypoint = "Taskfile.yml"
}
var err error
e.Taskfile, err = read.Taskfile(e.Dir)
e.Taskfile, err = read.Taskfile(e.Dir, e.Entrypoint)
if err != nil {
return err
}