From 3d2379241d65152f46b6a4a1c533d911cb2432ce Mon Sep 17 00:00:00 2001 From: Marco Colombo Date: Sun, 28 Dec 2025 21:22:21 +0100 Subject: [PATCH] Allows showing a progress bar even if only one element exists. --- R/progress-client.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/progress-client.R b/R/progress-client.R index 660f3943..21bbcfa5 100644 --- a/R/progress-client.R +++ b/R/progress-client.R @@ -442,7 +442,8 @@ cli_progress_update <- function( } } - if (pb$auto_terminate && !is.na(pb$total) && pb$current == pb$total) { + if (pb$auto_terminate && !is.na(pb$total) && pb$current == pb$total && + pb$total > 1) { cli_progress_done(id, .envir = .envir, result = "done") return(invisible(id)) }