1
0
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:
Andrey Nering
2022-03-31 21:37:06 -03:00
parent c6ff641f6d
commit 0f4621fb02
3 changed files with 9 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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,