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

refactoring

This commit is contained in:
jaedle 2019-03-04 12:25:42 +01:00
parent 23c4adcef6
commit c7f17b5319
2 changed files with 11 additions and 7 deletions

View File

@ -7,6 +7,16 @@ import (
"github.com/go-task/task/v2/internal/taskfile"
)
func PrintAll(l *logger.Logger, t *taskfile.Taskfile, c []taskfile.Call) {
for i, call := range c {
if i > 0 {
l.Outf("")
l.Outf("")
}
Print(l, t.Tasks[call.Task])
}
}
func Print(l *logger.Logger, t *taskfile.Task) {
printTaskName(l, t)
if hasSummary(t) {

View File

@ -65,13 +65,7 @@ func (e *Executor) Run(ctx context.Context, calls ...taskfile.Call) error {
}
if e.Summary {
for i, call := range calls {
if i > 0 {
e.Logger.Outf("")
e.Logger.Outf("")
}
summary.Print(e.Logger, e.Taskfile.Tasks[call.Task])
}
summary.PrintAll(e.Logger, e.Taskfile, calls)
return nil
}