progress: avoid double logs when multiple targets build same step

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2022-02-28 23:32:36 -08:00
parent 6efcee28d5
commit b77d7864fa
3 changed files with 55 additions and 11 deletions

View File

@ -8,14 +8,14 @@ import (
func WithPrefix(w Writer, pfx string, force bool) Writer {
return &prefixed{
main: w,
pfx: pfx,
force: force,
Writer: w,
pfx: pfx,
force: force,
}
}
type prefixed struct {
main Writer
Writer
pfx string
force bool
}
@ -26,7 +26,7 @@ func (p *prefixed) Write(v *client.SolveStatus) {
v.Name = addPrefix(p.pfx, v.Name)
}
}
p.main.Write(v)
p.Writer.Write(v)
}
func addPrefix(pfx, name string) string {