diff --git a/help.go b/help.go index 79417609..b586c1c5 100644 --- a/help.go +++ b/help.go @@ -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) } } diff --git a/internal/summary/summary.go b/internal/summary/summary.go index 655ec76c..1671e69d 100644 --- a/internal/summary/summary.go +++ b/internal/summary/summary.go @@ -9,12 +9,12 @@ import ( func PrintTasks(l *logger.Logger, t *taskfile.Taskfile, c []taskfile.Call) { for i, call := range c { - printSpaceBetweenSummaries(l, i) + PrintSpaceBetweenSummaries(l, i) PrintTask(l, t.Tasks[call.Task]) } } -func printSpaceBetweenSummaries(l *logger.Logger, i int) { +func PrintSpaceBetweenSummaries(l *logger.Logger, i int) { spaceRequired := i > 0 if !spaceRequired { return diff --git a/task.go b/task.go index 067d7229..4d303684 100644 --- a/task.go +++ b/task.go @@ -70,7 +70,14 @@ func (e *Executor) Run(ctx context.Context, calls ...taskfile.Call) error { } if e.Summary { - summary.PrintTasks(e.Logger, e.Taskfile, calls) + for i, c := range calls { + compiledTask, err := e.CompiledTask(c) + if err != nil { + return nil + } + summary.PrintSpaceBetweenSummaries(e.Logger, i) + summary.PrintTask(e.Logger, compiledTask) + } return nil } diff --git a/variables.go b/variables.go index 9c227372..d3e591f0 100644 --- a/variables.go +++ b/variables.go @@ -25,6 +25,7 @@ func (e *Executor) CompiledTask(call taskfile.Call) (*taskfile.Task, error) { new := taskfile.Task{ Task: origTask.Task, Desc: r.Replace(origTask.Desc), + Summary: r.Replace(origTask.Summary), Sources: r.ReplaceSlice(origTask.Sources), Generates: r.ReplaceSlice(origTask.Generates), Status: r.ReplaceSlice(origTask.Status),