pkgcache icon indicating copy to clipboard operation
pkgcache copied to clipboard

Hide "Loading metadata database" progress bar using `pkg.show_progress` option

Open pawelru opened this issue 1 year ago • 3 comments

Even if it's not documented - many packages make use of pkg.show_progress option to enable/disable progress bars. This package is no exception and it is used e.g. here: https://github.com/r-lib/pkgcache/blob/42e824939482c87b6216dfe30b7542a6e2e06d0f/R/progress-bar.R#L7

But unfortunately not everywhere and there is one little guy that still does not use it: https://github.com/r-lib/pkgcache/blob/42e824939482c87b6216dfe30b7542a6e2e06d0f/R/metadata-cache.R#L607-L615

pawelru avatar Jun 22 '23 17:06 pawelru

FWIW you can use suppressMessages() to suppress all messages.

gaborcsardi avatar Jun 22 '23 20:06 gaborcsardi

Thank you for the suggestion. I will use it instead of the option. Please decide what to do with this task. I am ok to close it without fix.

pawelru avatar Jun 27 '23 12:06 pawelru

Well, we use pkg.show_progress for an actual progress bar (off by default) currently, but not for the status messages. It would make sense to be able to suppress those as well, but it would be better to do this from some central place, e.g. in cli. So let's keep this open for now.

gaborcsardi avatar Jun 28 '23 12:06 gaborcsardi