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) Upstream-commit: 9810da853bd890b6c963017555c3555ef9e0d842 Component: engine
This commit is contained in:
committed by
Victor Vieux
parent
f91b76d592
commit
76507afd3a
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user