mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
force the read of the tarSum so that sums actually get computed
Docker-DCO-1.1-Signed-off-by: Brice Jaglin <bjaglin@teads.tv> (github: bjaglin)
This commit is contained in:
parent
a16cb394fa
commit
9810da853b
1 changed files with 3 additions and 0 deletions
|
@ -571,6 +571,9 @@ func (b *buildFile) CmdAdd(args string) error {
|
|||
return err
|
||||
}
|
||||
tarSum := utils.TarSum{Reader: r, DisableCompression: true}
|
||||
if _, err := io.Copy(ioutil.Discard, &tarSum); err != nil {
|
||||
return err
|
||||
}
|
||||
remoteHash = tarSum.Sum(nil)
|
||||
r.Close()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue