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 ## 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 - Added support for multi-level inclusion of Taskfiles. This means that
included Taskfiles can also include other Taskfiles. Before this was limited included Taskfiles can also include other Taskfiles. Before this was limited
to one level to one level

View File

@ -3,6 +3,7 @@ package task
import ( import (
"fmt" "fmt"
"io" "io"
"log"
"os" "os"
"sort" "sort"
"strings" "strings"
@ -79,8 +80,11 @@ func (e *Executor) tasksWithDesc() (tasks []*taskfile.Task) {
// Otherwise, all task names are printed. // Otherwise, all task names are printed.
func (e *Executor) ListTaskNames(allTasks bool) { func (e *Executor) ListTaskNames(allTasks bool) {
// if called from cmd/task.go, e.Taskfile has not yet been parsed // if called from cmd/task.go, e.Taskfile has not yet been parsed
if nil == e.Taskfile && e.readTaskfile() != nil { if e.Taskfile == nil {
return if err := e.readTaskfile(); err != nil {
log.Fatal(err)
return
}
} }
// use stdout if no output defined // use stdout if no output defined
var w io.Writer = os.Stdout 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. // readTaskfile selects and parses the entrypoint.
func (e *Executor) readTaskfile() error { func (e *Executor) readTaskfile() error {
// select the default entrypoint if not provided
if e.Entrypoint == "" {
e.Entrypoint = "Taskfile.yml"
}
var err error var err error
e.Taskfile, err = read.Taskfile(&read.ReaderNode{ e.Taskfile, err = read.Taskfile(&read.ReaderNode{
Dir: e.Dir, Dir: e.Dir,