From 7e382c79410b06d23af9a43d313aee96213a355d Mon Sep 17 00:00:00 2001 From: pat-s Date: Tue, 30 Jun 2026 08:50:44 +0200 Subject: [PATCH] fix(patches): report validator errors cleanly instead of crashing on malformed entries --- local/validate-patches.R | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/local/validate-patches.R b/local/validate-patches.R index dbf7f39..19effe4 100644 --- a/local/validate-patches.R +++ b/local/validate-patches.R @@ -34,9 +34,12 @@ for (i in seq_along(reg)) { # Ambiguous overlap: two entries for the same package with identical platforms # and versions. keys <- vapply(reg, function(e) { - sprintf("%s|%s|%s", e$package, - paste(sort(as.character(unlist(e$platforms))), collapse = ","), - e$versions) + sprintf( + "%s|%s|%s", + e$package %||% "?", + paste(sort(as.character(unlist(e$platforms))), collapse = ","), + e$versions %||% "?" + ) }, character(1L)) dups <- keys[duplicated(keys)] if (length(dups) > 0L) {