Merge pull request #5949 from wzshiming/fix/write-diff

archive: Add WriteDiff error logs
This commit is contained in:
Phil Estes 2021-09-08 09:28:49 -04:00 committed by GitHub
commit 5540fc4280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,9 @@ func Diff(ctx context.Context, a, b string) io.ReadCloser {
go func() { go func() {
err := WriteDiff(ctx, w, a, b) err := WriteDiff(ctx, w, a, b)
if err != nil {
log.G(ctx).WithError(err).Debugf("write diff failed")
}
if err = w.CloseWithError(err); err != nil { if err = w.CloseWithError(err); err != nil {
log.G(ctx).WithError(err).Debugf("closing tar pipe failed") log.G(ctx).WithError(err).Debugf("closing tar pipe failed")
} }