mirror of
https://github.com/go-task/task.git
synced 2025-01-26 05:27:15 +02:00
refactoring
This commit is contained in:
parent
23c4adcef6
commit
c7f17b5319
@ -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) {
|
||||
|
8
task.go
8
task.go
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user