renv 1.0.3 doesn't activate ONLY in RStudio

I am getting this very strange behaviour on renv 1.0.3, R 4.3.1, in Rstudio 2022.07.2+576 (also tried most recent version), Ubuntu 20.04

I have a renv.lock environment with packages installed in a renv folder that was working until recently. Now when I try to run renv::activate(here::here()) it Rstudio it

  1. asks if I want to save the current workspace.
  2. It then restarts R session
  3. Instead of loading the selected R renv it defaults to the folder specified in settings as Default working directory

Interestingly, when I start R from the command line it seems to load the correct renv immediately, i.e. this issues seems specific to RStudio.

Thank you for any tips with this.

This topic was automatically closed 21 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.