archive: Add WriteDiff error logs

Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
This commit is contained in:
Shiming Zhang 2021-09-06 18:03:45 +08:00
parent 61a46e9fdd
commit ccc5ee3038

View File

@ -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")
}