From 7aa82d68b470dfb273e1560582c04bba097d618b Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 14 Jun 2026 16:37:58 +0200 Subject: [PATCH] forget: fix error handling if snapshot key cannot be marshaled --- cmd/restic/cmd_forget.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/restic/cmd_forget.go b/cmd/restic/cmd_forget.go index 976db4d0d..1472e02b3 100644 --- a/cmd/restic/cmd_forget.go +++ b/cmd/restic/cmd_forget.go @@ -261,7 +261,7 @@ func runForget(ctx context.Context, opts ForgetOptions, pruneOptions PruneOption } var key data.SnapshotGroupKey - if json.Unmarshal([]byte(k), &key) != nil { + if err := json.Unmarshal([]byte(k), &key); err != nil { return err }