### Bug description

Taken from [Community](https://community.rstudio.com/t/rstudioapi-askforpassword-function-in-quarto/146254) (2022-01-01):

When running RMD documents I use the rstudioapi::askForPassword function to push passwords to databases. This works both in interactive mode and when knitting.

However when using qmd, when I hit the "render" button in RStudio 2022.07.1 Build 554
I get the error
Quitting from lines 16-19 (test.qmd)
Error: RStudio not running

I'm not sure how to create a reprex since it is an issue with rendering an RMD, but I get the error just by adding the command rstudioapi::askForPassword("testing") to an R chunk inside the default qmd template that is created when you do file > new quarto document

Is it not possible to use the rstudioapi package when rendering a qmd?

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
jjallaire
2022-09-02T13:22:44Z
rich-iannone
bug upstream
Future
closed
Cannot use `rstudioapi::askForPassword()`; works in .Rmd
https://github.com/quarto-dev/quarto-cli/issues/2269