From fcbc4e8e924feecef635b76c5e420d6d7ae49ec2 Mon Sep 17 00:00:00 2001 From: pat-s Date: Wed, 9 Sep 2026 10:45:59 +0000 Subject: [PATCH] fix(abi): do not error on the nothing-to-repair path A slot with verdicts recorded but nothing unsafe died on its own success message: Error in sprintf("%s/%s: %d objects recorded, none unsafe. Nothing to repair.", ...) RPostgres returns count(*) as integer64, which %d rejects. The pipeline step then failed for a slot that was in the best possible state, which is the wrong signal entirely. --- local/list-unsafe-flat-objects.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/local/list-unsafe-flat-objects.R b/local/list-unsafe-flat-objects.R index 1937f99..60649a2 100644 --- a/local/list-unsafe-flat-objects.R +++ b/local/list-unsafe-flat-objects.R @@ -141,11 +141,13 @@ if (nrow(rows) == 0L) { call. = FALSE ) } + # `count(*)` arrives as a double (or integer64), and `%d` rejects both, so the + # nothing-to-do path used to die on its own success message. message(sprintf( - "%s/%s: %d objects recorded, none unsafe. Nothing to repair.", + "%s/%s: %s objects recorded, none unsafe. Nothing to repair.", arch, codename, - total + format(as.numeric(total), scientific = FALSE) )) quit(status = 0) } -- 2.54.0