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

document(quiet = TRUE) is too quiet when a required package is not installed #2532

Open
haugedal opened this issue Aug 14, 2023 · 1 comment
Labels
feature a feature request or enhancement

Comments

@haugedal
Copy link

When running document() with the argument quiet = TRUE on a package where another required package is not installed you get the following “question”:

Selection:

With no information about what you are answering/selecting or how to answer/select.

The unsuppressed question with selections is as follows:

ℹ The package "packageName" is required.
✖ Would you like to install it?

1: Yes
2: No

It seems reasonable to show this information when running document(), even with quiet = TRUE.

@jennybc jennybc added the feature a feature request or enhancement label Nov 2, 2023
@jennybc
Copy link
Member

jennybc commented Nov 2, 2023

I agree it is reasonable to surface this, but this is also relatively low priority. I think an attempt to do any other package development task will likely also surface this problem in a less cryptic way.

I see this in roxygen2::roxygenize():

https://github.com/r-lib/roxygen2/blob/066c3a504ef94e9fcdf3a133706e59e184dfaa27/R/roxygenize.R#L53-L55

if (!is_interactive()) {
    withr::local_options(warn = 1)
}

So the easiest fix would be to call roxygen2::roxygenize() as if non-interactive when quiet = TRUE to get whatever the intended experience is in a non-interactive session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants