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

Fix bug with STDOUT and STDERR in the "group" output mode

Took the oportunity to refactor a bit how we handle closing of the streams.

Fixes #779
This commit is contained in:
Andrey Nering
2022-07-06 10:43:32 -03:00
parent de45e48c37
commit e36c77aaf3
7 changed files with 40 additions and 37 deletions

View File

@@ -15,9 +15,11 @@ type Templater interface {
}
type Output interface {
WrapWriter(w io.Writer, prefix string, tmpl Templater) io.Writer
WrapWriter(stdOut, stdErr io.Writer, prefix string, tmpl Templater) (io.Writer, io.Writer, CloseFunc)
}
type CloseFunc func() error
// Build the Output for the requested taskfile.Output.
func BuildFor(o *taskfile.Output) (Output, error) {
switch o.Name {