Skip to content
This repository was archived by the owner on Jan 20, 2021. It is now read-only.

Commit 9acf51e

Browse files
authored
Merge pull request moby#485 from tonistiigi/progressui-fix
progressui: fix log line separation bug
2 parents 0f20a37 + 07d8189 commit 9acf51e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

util/progress/progressui/display.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,9 @@ func (t *trace) update(s *client.SolveStatus) {
212212
if !ok {
213213
continue // shouldn't happen
214214
}
215+
i := 0
215216
complete := split(l.Data, byte('\n'), func(dt []byte) {
216-
if v.logsPartial && len(v.logs) != 0 {
217+
if v.logsPartial && len(v.logs) != 0 && i == 0 {
217218
v.logs[len(v.logs)-1] = append(v.logs[len(v.logs)-1], dt...)
218219
} else {
219220
ts := time.Duration(0)
@@ -222,6 +223,7 @@ func (t *trace) update(s *client.SolveStatus) {
222223
}
223224
v.logs = append(v.logs, []byte(fmt.Sprintf("#%d %s %s", v.index, fmt.Sprintf("%#.4g", ts.Seconds())[:5], dt)))
224225
}
226+
i++
225227
})
226228
v.logsPartial = !complete
227229
t.updates[v.Digest] = struct{}{}

0 commit comments

Comments
 (0)