From e0d3fc0fa55d4fead0835f2c9e1f15c7a5ef2f52 Mon Sep 17 00:00:00 2001 From: alingse Date: Sun, 30 Mar 2025 14:08:55 +0800 Subject: [PATCH] fix(general): use correct error in call to errors.Wrap (#4477) use `twerr` instead of `err`, which is always `nil` --- snapshot/snapshotgc/gc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapshot/snapshotgc/gc.go b/snapshot/snapshotgc/gc.go index 0368e4b45..b43056fbf 100644 --- a/snapshot/snapshotgc/gc.go +++ b/snapshot/snapshotgc/gc.go @@ -51,7 +51,7 @@ func findInUseContentIDs(ctx context.Context, rep repo.Repository, used *bigmap. }, }) if twerr != nil { - return errors.Wrap(err, "unable to create tree walker") + return errors.Wrap(twerr, "unable to create tree walker") } defer w.Close(ctx)