From ccc5ee303892023081a880ffc32bbd8ebf56461d Mon Sep 17 00:00:00 2001 From: Shiming Zhang Date: Mon, 6 Sep 2021 18:03:45 +0800 Subject: [PATCH] archive: Add WriteDiff error logs Signed-off-by: Shiming Zhang --- archive/tar.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/archive/tar.go b/archive/tar.go index af11c5a97..b7125b772 100644 --- a/archive/tar.go +++ b/archive/tar.go @@ -54,6 +54,9 @@ func Diff(ctx context.Context, a, b string) io.ReadCloser { go func() { 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 { log.G(ctx).WithError(err).Debugf("closing tar pipe failed") }