Fix io.Reader ambiguity on EOF in progressreader
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass) Upstream-commit: caa57699283fd0fa47cac59c80adcacaa5c9950e Component: engine
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user