Open obregos opened 1 year ago
I am confused by this. We tested .Platform$GUI
and it returns 'RStudio' in the Mac environment when knit. If we run rstudioapi::askForPassword("Yo")
directly in the Rmd it works on Mac, but getPass doesn't. This doesn't make sense.
I've modified our code to do the following
.default_pass <- function()
{
if(grepl('mac', tolower(utils::osVersion)) &&
requireNamespace("rstudioapi", quietly = TRUE) &&
rstudioapi::isAvailable(child_ok=TRUE))
{
rstudioapi::askForPassword
} else getOption('askpass', default = getPass::getPass)
}
This works on a Mac when pushing the knit button.
Running the following code in my .Rmd file does not produce the expected output when I Knit the .Rmd. There is no prompt and the html document is returned with no additional information.
Running the code in the console works and displays a prompt that can be entered and returned correctly. However, the knit does not provide a prompt.
If you are having issues using the package, please provide some platform information which you can determine with the following R code:
If your interface is RStudio, please provide the following additional information: