Skip to content

Commit b399e2e

Browse files
committed
Don't lose Compare failure if aborting diff upload fails
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
1 parent 6636e36 commit b399e2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

diff/walking/differ.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ func (s *walkingDiff) Compare(ctx context.Context, lower, upper []mount.Mount, o
9999
if err != nil {
100100
cw.Close()
101101
if newReference {
102-
if err := s.store.Abort(ctx, config.Reference); err != nil {
103-
log.G(ctx).WithField("ref", config.Reference).Warnf("failed to delete diff upload")
102+
if abortErr := s.store.Abort(ctx, config.Reference); abortErr != nil {
103+
log.G(ctx).WithError(abortErr).WithField("ref", config.Reference).Warnf("failed to delete diff upload")
104104
}
105105
}
106106
}

0 commit comments

Comments
 (0)