rstudioapi::askForPassword function in quarto

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?

An issue has been opened on Quarto and I some contribution to discussion there

Thanks for the update; I read the report (and response), I've seen a similar comment that " The R process launch by Quarto won't have access to any of the IDE feature as this not interactive and not running in the IDE." in another request.

Just from a user side; when rendering from within RStudio IDE it does cause a certain pain-point not to be able to use features of the IDE. You noted that you didn't think typing a password when rendering was ideal - but it works in the corporate environment when there is concern with storing passwords.

FYI - I ran across this same issue as reported in 2310 as well - I'll need to shift back to RMD until that bug is fixed anyway - but it has been interesting playing with it interactively.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.