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 }