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:
parent
d082381a93
commit
caa5769928
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue