You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using quarto::quarto_use_template, to install a quarto extension, the user is prompted to indicate whether the author of the extention is trusted. When the user indicates trust with the letter Y, the function returns:
Error in if (approval) { : argument is of length zero
Upon investigation, it seems that quarto::check_extension_approval returns NULL instead of TRUE after the user responds to the prompt with "Y". Perhaps adding one line to the function like this would fix the problem:
check_extension_approval <- function(no_prompt = FALSE, what = "Something", see_more_at = NULL) {
if (no_prompt) return(TRUE)
if (!rlang::is_interactive()) {
cli::cli_abort(c(
"{ what } requires explicit approval.",
">" = "Set {.arg no_prompt = TRUE} if you agree.",
if (!is.null(see_more_at)) {
c(i = "See more at {.url {see_more_at}}")
}
))
} else {
cli::cli_inform(c(
"{what} may execute code when documents are rendered. ",
"*" = "If you do not trust the author(s) of this {what}, we recommend that you do not install or use this {what}."
))
prompt_value <- tolower(readline(sprintf("Do you trust the authors of this %s (Y/n)? ", what)))
if (!prompt_value %in% "y") {
cli::cli_inform("{what} not installed.")
return(invisible(FALSE))
} else {
return(invisible(TRUE))
}
}
}
The text was updated successfully, but these errors were encountered:
When using
quarto::quarto_use_template
, to install a quarto extension, the user is prompted to indicate whether the author of the extention is trusted. When the user indicates trust with the letter Y, the function returns:Error in if (approval) { : argument is of length zero
Upon investigation, it seems that
quarto::check_extension_approval
returnsNULL
instead ofTRUE
after the user responds to the prompt with "Y". Perhaps adding one line to the function like this would fix the problem:The text was updated successfully, but these errors were encountered: