From c5861c6a61bf370ce91f5793fd7c3493d0fd19f8 Mon Sep 17 00:00:00 2001 From: Arnaud Porterie Date: Tue, 17 Jun 2014 22:26:03 +0200 Subject: [PATCH] Avoid erasing line for non-progress messages The JSONMessage.Display methods erases the entire line by outputting the [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 (github: icecrime) Upstream-commit: 3807f8b708b60588526f555190d14a37db408450 Component: engine --- components/engine/utils/jsonmessage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/utils/jsonmessage.go b/components/engine/utils/jsonmessage.go index d6546e3ee6..66fdcae5a8 100644 --- a/components/engine/utils/jsonmessage.go +++ b/components/engine/utils/jsonmessage.go @@ -87,7 +87,7 @@ func (jm *JSONMessage) Display(out io.Writer, isTerminal bool) error { return jm.Error } var endl string - if isTerminal && jm.Stream == "" { + if isTerminal && jm.Stream == "" && jm.Progress != nil { // [2K = erase entire current line fmt.Fprintf(out, "%c[2K\r", 27) endl = "\r"