Update buildkit w/ customizable output colors, etc.

Signed-off-by: Sean P. Kane <spkane00@gmail.com>
This commit is contained in:
Sean P. Kane
2022-07-21 13:49:21 -07:00
parent 701c548e46
commit 6583dd3aa2
10 changed files with 200 additions and 32 deletions

View File

@ -108,6 +108,7 @@ type job struct {
name string
status string
hasError bool
hasWarning bool // This is currently unused, but it's here for future use.
isCanceled bool
vertex *vertex
showTerm bool
@ -829,8 +830,13 @@ func (disp *display) print(d displayInfo, width, height int, all bool) {
color = colorCancel
} else if j.hasError {
color = colorError
} else if j.hasWarning {
// This is currently unused, but it's here for future use.
color = colorWarning
}
if color != nil {
out = aec.Apply(out, color)
}
out = aec.Apply(out, color)
}
fmt.Fprint(disp.c, out)
lineCount++