From 1da81ba36335afb1ab2e557d2c06263b283d92fd Mon Sep 17 00:00:00 2001 From: Tibor Vass Date: Fri, 25 Jul 2014 18:31:06 -0400 Subject: [PATCH] Fix io.Reader ambiguity on EOF in progressreader Docker-DCO-1.1-Signed-off-by: Tibor Vass (github: tiborvass) Upstream-commit: caa57699283fd0fa47cac59c80adcacaa5c9950e Component: engine --- components/engine/utils/progressreader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/utils/progressreader.go b/components/engine/utils/progressreader.go index a43ee55b0f..87eae8ba73 100644 --- a/components/engine/utils/progressreader.go +++ b/components/engine/utils/progressreader.go @@ -32,7 +32,7 @@ func (r *progressReader) Read(p []byte) (n int, err error) { r.lastUpdate = r.progress.Current } // Send newline when complete - if r.newLine && err != nil { + if r.newLine && err != nil && read == 0 { r.output.Write(r.sf.FormatStatus("", "")) } return read, err