mirror of
https://github.com/go-task/task.git
synced 2025-06-25 00:47:04 +02:00
CHANGELOG: Add entry for #691
This commit is contained in:
@ -2,6 +2,9 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
- The `--list` and `--list-all` flags can now be combined with the `--silent`
|
||||
flag to print the task names only, without their description
|
||||
([#691](https://github.com/go-task/task/pull/691)).
|
||||
- Added support for multi-level inclusion of Taskfiles. This means that
|
||||
included Taskfiles can also include other Taskfiles. Before this was limited
|
||||
to one level
|
||||
|
8
help.go
8
help.go
@ -3,6 +3,7 @@ package task
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"sort"
|
||||
"strings"
|
||||
@ -79,8 +80,11 @@ func (e *Executor) tasksWithDesc() (tasks []*taskfile.Task) {
|
||||
// Otherwise, all task names are printed.
|
||||
func (e *Executor) ListTaskNames(allTasks bool) {
|
||||
// if called from cmd/task.go, e.Taskfile has not yet been parsed
|
||||
if nil == e.Taskfile && e.readTaskfile() != nil {
|
||||
return
|
||||
if e.Taskfile == nil {
|
||||
if err := e.readTaskfile(); err != nil {
|
||||
log.Fatal(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
// use stdout if no output defined
|
||||
var w io.Writer = os.Stdout
|
||||
|
5
task.go
5
task.go
@ -106,11 +106,6 @@ func (e *Executor) Run(ctx context.Context, calls ...taskfile.Call) error {
|
||||
|
||||
// readTaskfile selects and parses the entrypoint.
|
||||
func (e *Executor) readTaskfile() error {
|
||||
// select the default entrypoint if not provided
|
||||
if e.Entrypoint == "" {
|
||||
e.Entrypoint = "Taskfile.yml"
|
||||
}
|
||||
|
||||
var err error
|
||||
e.Taskfile, err = read.Taskfile(&read.ReaderNode{
|
||||
Dir: e.Dir,
|
||||
|
Reference in New Issue
Block a user