diff --git a/.Rprofile b/.Rprofile index bf3c215a9..3e1a88ed8 100644 --- a/.Rprofile +++ b/.Rprofile @@ -13,6 +13,9 @@ if (file.exists("renv.lock") && file.exists("README.md") && !file.exists("renv/o # do not check if library and renv.lock are in sync, because normally renv.lock does not exist options(renv.config.synchronized.check = FALSE) +# always set the renv project to the current directory (formerly done by renv/activate.R under version 0.16.0) +Sys.setenv("RENV_PROJECT" = getwd()) + source("renv/activate.R") # when increasing renvVersion first commit new version's activate script and diff --git a/scripts/start/run.R b/scripts/start/run.R index 5655b1fd8..15ad01541 100644 --- a/scripts/start/run.R +++ b/scripts/start/run.R @@ -261,6 +261,7 @@ run <- function() { if (normalizePath(renv::project()) != normalizePath(outputdir)) { warning("loaded renv=", normalizePath(renv::project()), " and outputdir=", normalizePath(outputdir), " must be equal.") } + message("Using ", normalizePath(renv::project()), " as renv project") argv <- c(get0("argv"), paste0("--renv=", renv::project())) }