Skip to content

Never seeing the first progress message from cli_progress_along() #668

@asadow

Description

@asadow

cli_progress_along() seems to be skipping the first iteration, and after 2 seconds, the function outputs the message regarding the first iteration even though it is on the second?
 

library(cli)
lapply(cli_progress_along(1:2, 
                        format = "Downloading data file {cli::pb_current}"),
     function(i) {
Sys.sleep(2)
})
#> Downloading data file 1
#> [[1]]
#> NULL
#> 
#> [[2]]
#> NULL

Created on 2024-02-02 with reprex v2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviortidy-dev-day 🤓Tidyverse Developer Day rstd.io/tidy-dev-day

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions