Skip to content

Commit 0f4621f

Browse files
committed
CHANGELOG: Add entry for #691
1 parent c6ff641 commit 0f4621f

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Unreleased
44

5+
- The `--list` and `--list-all` flags can now be combined with the `--silent`
6+
flag to print the task names only, without their description
7+
([#691](https://github.com/go-task/task/pull/691)).
58
- Added support for multi-level inclusion of Taskfiles. This means that
69
included Taskfiles can also include other Taskfiles. Before this was limited
710
to one level

help.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package task
33
import (
44
"fmt"
55
"io"
6+
"log"
67
"os"
78
"sort"
89
"strings"
@@ -79,8 +80,11 @@ func (e *Executor) tasksWithDesc() (tasks []*taskfile.Task) {
7980
// Otherwise, all task names are printed.
8081
func (e *Executor) ListTaskNames(allTasks bool) {
8182
// if called from cmd/task.go, e.Taskfile has not yet been parsed
82-
if nil == e.Taskfile && e.readTaskfile() != nil {
83-
return
83+
if e.Taskfile == nil {
84+
if err := e.readTaskfile(); err != nil {
85+
log.Fatal(err)
86+
return
87+
}
8488
}
8589
// use stdout if no output defined
8690
var w io.Writer = os.Stdout

task.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,6 @@ func (e *Executor) Run(ctx context.Context, calls ...taskfile.Call) error {
106106

107107
// readTaskfile selects and parses the entrypoint.
108108
func (e *Executor) readTaskfile() error {
109-
// select the default entrypoint if not provided
110-
if e.Entrypoint == "" {
111-
e.Entrypoint = "Taskfile.yml"
112-
}
113-
114109
var err error
115110
e.Taskfile, err = read.Taskfile(&read.ReaderNode{
116111
Dir: e.Dir,

0 commit comments

Comments
 (0)