1
0
mirror of https://github.com/go-task/task.git synced 2025-11-25 22:32:55 +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

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