The JSONMessage.Display methods erases the entire line by outputting the <ESC>[2K\r sequence before displaying the message content. This is not necessary for messages other than progress indicators, and introduces unwanted characters in the /events output.
Fixes #6203.
Docker-DCO-1.1-Signed-off-by: Arnaud Porterie <icecrime@gmail.com> (github: icecrime)
| ... | ... |
@@ -87,7 +87,7 @@ func (jm *JSONMessage) Display(out io.Writer, isTerminal bool) error {
|
| 87 | 87 |
return jm.Error |
| 88 | 88 |
} |
| 89 | 89 |
var endl string |
| 90 |
- if isTerminal && jm.Stream == "" {
|
|
| 90 |
+ if isTerminal && jm.Stream == "" && jm.Progress != nil {
|
|
| 91 | 91 |
// <ESC>[2K = erase entire current line |
| 92 | 92 |
fmt.Fprintf(out, "%c[2K\r", 27) |
| 93 | 93 |
endl = "\r" |