Skip to content

Commit

Permalink
Only rewrite layers with matching id and version
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmcnew authored Nov 30, 2021
1 parent cec7e19 commit 8447d34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buildpack/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (m BuildpackLayerMetadata) metadataAndLayersFor(sourceImage v1.Image, oldId
for id, versions := range m {
for v, buildpack := range versions {

if v != oldVersion && id != oldId {
if v != oldVersion || id != oldId {
if _, ok := newLayerMetdata[id]; !ok {
newLayerMetdata[id] = map[string]BuildpackLayerInfo{}
}
Expand Down

0 comments on commit 8447d34

Please sign in to comment.