Fix io.Reader ambiguity on EOF in progressreader

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
This commit is contained in:
Tibor Vass 2014-07-25 18:31:06 -04:00
parent d082381a93
commit caa5769928
1 changed files with 1 additions and 1 deletions

View File

@ -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