1
0
mirror of https://github.com/go-task/task.git synced 2025-08-10 22:42:19 +02:00

Add ability to set error_only: true on the group output mode

This commit is contained in:
Dennis Jekubczyk
2023-03-09 02:34:52 +01:00
committed by GitHub
parent 4b97d4f7f5
commit 88d644a7e9
13 changed files with 135 additions and 16 deletions

View File

@@ -18,7 +18,7 @@ type Output interface {
WrapWriter(stdOut, stdErr io.Writer, prefix string, tmpl Templater) (io.Writer, io.Writer, CloseFunc)
}
type CloseFunc func() error
type CloseFunc func(err error) error
// Build the Output for the requested taskfile.Output.
func BuildFor(o *taskfile.Output) (Output, error) {
@@ -30,8 +30,9 @@ func BuildFor(o *taskfile.Output) (Output, error) {
return Interleaved{}, nil
case "group":
return Group{
Begin: o.Group.Begin,
End: o.Group.End,
Begin: o.Group.Begin,
End: o.Group.End,
ErrorOnly: o.Group.ErrorOnly,
}, nil
case "prefixed":
if err := checkOutputGroupUnset(o); err != nil {