mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add a progress bar for ADD <url> <dst>
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
parent
f74b901da6
commit
4e40d09a2b
1 changed files with 2 additions and 1 deletions
|
@ -151,10 +151,11 @@ func (b *Builder) runContextCommand(args []string, allowRemote bool, allowDecomp
|
||||||
defer os.RemoveAll(tmpDirName)
|
defer os.RemoveAll(tmpDirName)
|
||||||
|
|
||||||
// Download and dump result to tmp file
|
// Download and dump result to tmp file
|
||||||
if _, err := io.Copy(tmpFile, resp.Body); err != nil {
|
if _, err := io.Copy(tmpFile, utils.ProgressReader(resp.Body, int(resp.ContentLength), b.OutOld, b.StreamFormatter, true, "", "Downloading")); err != nil {
|
||||||
tmpFile.Close()
|
tmpFile.Close()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
fmt.Fprintf(b.OutStream, "\n")
|
||||||
tmpFile.Close()
|
tmpFile.Close()
|
||||||
|
|
||||||
// Remove the mtime of the newly created tmp file
|
// Remove the mtime of the newly created tmp file
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue