Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress bar should handle total = Inf better #630

Closed
mgirlich opened this issue Sep 7, 2023 · 1 comment · Fixed by #722
Closed

Progress bar should handle total = Inf better #630

mgirlich opened this issue Sep 7, 2023 · 1 comment · Fixed by #722
Labels
bug an unexpected problem or unintended behavior tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day

Comments

@mgirlich
Copy link

mgirlich commented Sep 7, 2023

This should either be an error or (I think the better option) treat it the same as total = NA

library(cli)
cli_progress_bar("Cleaning data", total = Inf)
for (i in 1:100) {
  Sys.sleep(5/100)
  cli_progress_update()
}
#> Error in "\"id\" %in% names(args)": ! Could not evaluate cli `{}` expression: `cli::pb_eta`.
#> Caused by error in `(function (fmt, ...) …`:
#> ! invalid format '%2d'; use format %f, %e, %g or %a for numeric objects

Created on 2023-09-07 with reprex v2.0.2

@gaborcsardi gaborcsardi added the bug an unexpected problem or unintended behavior label Oct 31, 2023
@gaborcsardi
Copy link
Member

Yeah, agreed.

@gaborcsardi gaborcsardi added the tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day label Jul 17, 2024
LouisMPenrod added a commit to LouisMPenrod/cli that referenced this issue Aug 15, 2024
…= NA

Add test to check same behavior
Update NEWS
Fixes r-lib#630
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants