1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #11123 from jlhawn/pull_tempfile_copy_log_error

Check for error when copying v2 image blob to temp
This commit is contained in:
Arnaud Porterie 2015-03-09 11:14:03 -07:00
commit 2e518bc831

View file

@ -496,7 +496,9 @@ func (s *TagStore) pullV2Tag(eng *engine.Engine, r *registry.Session, out io.Wri
return fmt.Errorf("unable to wrap image blob reader with TarSum: %s", err) return fmt.Errorf("unable to wrap image blob reader with TarSum: %s", err)
} }
io.Copy(tmpFile, utils.ProgressReader(ioutil.NopCloser(tarSumReader), int(l), out, sf, false, common.TruncateID(img.ID), "Downloading")) if _, err := io.Copy(tmpFile, utils.ProgressReader(ioutil.NopCloser(tarSumReader), int(l), out, sf, false, common.TruncateID(img.ID), "Downloading")); err != nil {
return fmt.Errorf("unable to copy v2 image blob data: %s", err)
}
out.Write(sf.FormatProgress(common.TruncateID(img.ID), "Verifying Checksum", nil)) out.Write(sf.FormatProgress(common.TruncateID(img.ID), "Verifying Checksum", nil))