include image name in error message

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas 2024-01-16 18:44:55 -05:00
parent 07362334f0
commit 725c92e7c7
No known key found for this signature in database
GPG Key ID: 80D83A796103BF59

View File

@ -335,7 +335,7 @@ func (i *image) Unpack(ctx context.Context, snapshotterName string, opts ...Unpa
for _, layer := range layers {
unpacked, err = rootfs.ApplyLayerWithOpts(ctx, layer, chain, sn, a, config.SnapshotOpts, config.ApplyOpts)
if err != nil {
return err
return fmt.Errorf("apply layer error for %q: %w", i.Name(), err)
}
if unpacked {