Skip to content

Commit 062d056

Browse files
authored
Merge pull request #3345 from crosbymichael/diff-panic
Ensure labels is not nil in differ
2 parents 50cd49d + 0525515 commit 062d056

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

diff/walking/differ.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ func (s *walkingDiff) Compare(ctx context.Context, lower, upper []mount.Mount, o
150150
if err != nil {
151151
return errors.Wrap(err, "failed to get info from content store")
152152
}
153-
153+
if info.Labels == nil {
154+
info.Labels = make(map[string]string)
155+
}
154156
// Set uncompressed label if digest already existed without label
155157
if _, ok := info.Labels[uncompressed]; !ok {
156158
info.Labels[uncompressed] = config.Labels[uncompressed]

0 commit comments

Comments
 (0)