forget: fix error handling if snapshot key cannot be marshaled

This commit is contained in:
Michael Eischer
2026-06-14 16:37:58 +02:00
parent 7d36449ea8
commit 6b88b072e0
+1 -1
View File
@@ -262,7 +262,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
}