builder: patch incomplete download handling
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
ed651e796c
commit
8900e3c758
1 changed files with 3 additions and 0 deletions
|
@ -497,7 +497,10 @@ func (ld *layerDescriptor) Download(ctx context.Context, progressOutput pkgprogr
|
|||
|
||||
refKey := remotes.MakeRefKey(ctx, ld.desc)
|
||||
|
||||
ld.is.ContentStore.Abort(ctx, refKey)
|
||||
|
||||
if err := content.WriteBlob(ctx, ld.is.ContentStore, refKey, rc, ld.desc.Size, ld.desc.Digest); err != nil {
|
||||
ld.is.ContentStore.Abort(ctx, refKey)
|
||||
return nil, 0, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue