Replace errors.Cause() with errors.Is()
Dependencies may be switching to use the new `%w` formatting option to wrap errors; switching to use `errors.Is()` makes sure that we are still able to unwrap the error and detect the underlying cause. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -265,7 +265,7 @@ func (u *unpacker) fetch(ctx context.Context, h images.Handler, layers []ocispec
|
||||
if u.limiter != nil {
|
||||
u.limiter.Release(1)
|
||||
}
|
||||
if err != nil && errors.Cause(err) != images.ErrSkipDesc {
|
||||
if err != nil && !errors.Is(err, images.ErrSkipDesc) {
|
||||
return err
|
||||
}
|
||||
close(done[i])
|
||||
|
Reference in New Issue
Block a user