Skip to content

Commit

Permalink
temp fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joeybrown-sf committed Jul 12, 2024
1 parent dcea1b3 commit dba6b9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cache/image_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"io"
"runtime"
"strings"

"github.com/buildpacks/imgutil"
"github.com/buildpacks/imgutil/remote"
Expand Down Expand Up @@ -116,7 +117,8 @@ func IsLayerNotFound(err error) bool {
func (c *ImageCache) RetrieveLayer(diffID string) (io.ReadCloser, error) {
closer, err := c.origImage.GetLayer(diffID)
if err != nil {
if IsLayerNotFound(err) {
// TODO: This is a workaround for a bug in the imgutil library where it returns an error when the layer is not found
if IsLayerNotFound(err) || strings.Contains(err.Error(), "EOF") {
return nil, NewReadErr(fmt.Sprintf("failed to find cache layer with SHA '%s'", diffID))
}
return nil, fmt.Errorf("failed to get cache layer with SHA '%s'", diffID)
Expand Down

0 comments on commit dba6b9a

Please sign in to comment.