mirror of
https://github.com/go-task/task.git
synced 2025-11-27 22:38:20 +02:00
display summary for tasks without summary/description
This commit is contained in:
12
task.go
12
task.go
@@ -66,7 +66,7 @@ func (e *Executor) Run(ctx context.Context, calls ...taskfile.Call) error {
|
||||
|
||||
if e.Summary {
|
||||
firstTask := calls[0].Task
|
||||
e.printTaskSummary(firstTask)
|
||||
summary.Print(e.Logger, e.Taskfile.Tasks[firstTask])
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -82,16 +82,6 @@ func (e *Executor) Run(ctx context.Context, calls ...taskfile.Call) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *Executor) printTaskSummary(task string) {
|
||||
t := e.Taskfile.Tasks[task]
|
||||
if t.Summary == "" {
|
||||
e.Logger.Errf("task: There is no summary for task: %s", task)
|
||||
return
|
||||
}
|
||||
|
||||
summary.Print(e.Logger, t)
|
||||
}
|
||||
|
||||
// Setup setups Executor's internal state
|
||||
func (e *Executor) Setup() error {
|
||||
var err error
|
||||
|
||||
Reference in New Issue
Block a user