Skip to content

Commit 0525515

Browse files
committed
Ensure labels is not nil in differ
Signed-off-by: Michael Crosby <[email protected]>
1 parent fe58b49 commit 0525515

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)