mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #11961 from dmcgowan/fix-build-progress-output-11849
Fix progress reader output on close
This commit is contained in:
commit
da6248751b
1 changed files with 3 additions and 1 deletions
|
@ -1,9 +1,10 @@
|
|||
package progressreader
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/docker/docker/pkg/jsonmessage"
|
||||
"github.com/docker/docker/pkg/streamformatter"
|
||||
"io"
|
||||
)
|
||||
|
||||
// Reader with progress bar
|
||||
|
@ -43,6 +44,7 @@ func (config *Config) Read(p []byte) (n int, err error) {
|
|||
return read, err
|
||||
}
|
||||
func (config *Config) Close() error {
|
||||
config.Current = config.Size
|
||||
config.Out.Write(config.Formatter.FormatProgress(config.ID, config.Action, &jsonmessage.JSONProgress{Current: config.Current, Total: config.Size}))
|
||||
return config.In.Close()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue