diff --git a/builder/builder-next/adapters/snapshot/snapshot.go b/builder/builder-next/adapters/snapshot/snapshot.go index 14ff5fd289..19ee488b8e 100644 --- a/builder/builder-next/adapters/snapshot/snapshot.go +++ b/builder/builder-next/adapters/snapshot/snapshot.go @@ -383,10 +383,7 @@ func (s *snapshotter) Commit(ctx context.Context, name, key string, opts ...snap if err != nil { return err } - if err := b.Put(keyIsCommitted, []byte{}); err != nil { - return err - } - return nil + return b.Put(keyIsCommitted, []byte{}) }) } diff --git a/plugin/fetch_linux.go b/plugin/fetch_linux.go index 19b9bbf18e..8ec85f9f36 100644 --- a/plugin/fetch_linux.go +++ b/plugin/fetch_linux.go @@ -109,10 +109,7 @@ func (pm *Manager) fetch(ctx context.Context, ref reference.Named, auth *types.A fp := withFetchProgress(pm.blobStore, out, ref) handlers = append([]images.Handler{fp, remotes.FetchHandler(pm.blobStore, fetcher)}, handlers...) - if err := images.Dispatch(ctx, images.Handlers(handlers...), nil, desc); err != nil { - return err - } - return nil + return images.Dispatch(ctx, images.Handlers(handlers...), nil, desc) } // applyLayer makes an images.HandlerFunc which applies a fetched image rootfs layer to a directory.