1
0
mirror of https://github.com/go-task/task.git synced 2025-12-01 22:52:02 +02:00

Compile tasks before printing help or summary (Closes #276)

This commit is contained in:
Paul Varache
2020-01-20 13:38:18 +00:00
parent de98a53b43
commit 7453e688fd
4 changed files with 15 additions and 3 deletions

View File

@@ -29,6 +29,10 @@ func (e *Executor) tasksWithDesc() (tasks []*taskfile.Task) {
tasks = make([]*taskfile.Task, 0, len(e.Taskfile.Tasks))
for _, task := range e.Taskfile.Tasks {
if task.Desc != "" {
compiledTask, err := e.CompiledTask(taskfile.Call{Task: task.Task})
if err == nil {
task = compiledTask
}
tasks = append(tasks, task)
}
}