1
0
mirror of https://github.com/go-task/task.git synced 2025-01-26 05:27:15 +02:00

fix: list + silent flags shouldn't display internal tasks

This commit is contained in:
Pete Davison 2022-07-24 15:54:23 +00:00
parent e3b6c97c3b
commit 11409ccf21

View File

@ -94,7 +94,7 @@ func (e *Executor) ListTaskNames(allTasks bool) {
// create a string slice from all map values (*taskfile.Task)
s := make([]string, 0, len(e.Taskfile.Tasks))
for _, t := range e.Taskfile.Tasks {
if allTasks || t.Desc != "" {
if (allTasks || t.Desc != "") && !t.Internal {
s = append(s, strings.TrimRight(t.Task, ":"))
}
}