Skip to content

Commit

Permalink
Merge pull request #1730 from pascal-sauer/develop
Browse files Browse the repository at this point in the history
reset renv/activate.R fix
  • Loading branch information
pascal-sauer authored Jul 5, 2024
2 parents a3244b3 + c2ec11b commit b754f62
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .Rprofile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ 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)
# always set the renv project to the current directory
Sys.setenv("RENV_PROJECT" = getwd())

# when increasing renvVersion first commit new version's activate script and
# put that commit's hash into the git checkout call below
renvVersion <- "1.0.7"

# reset renv/activate.R to match renv 1.0.7
if (Sys.getenv("RESET_RENV_ACTIVATE_SCRIPT", unset = "TRUE") == "TRUE") {
system("git checkout b83bb1811ff08d8ee5ba8e834af5dd0080d10e66 -- renv/activate.R")
gitRoot <- system2("git", c("rev-parse", "--show-toplevel"), stdout = TRUE)
if (Sys.getenv("RESET_RENV_ACTIVATE_SCRIPT", unset = "TRUE") == "TRUE" &&
normalizePath(gitRoot) == normalizePath(".")) {
system2("git", c("checkout", "b83bb1811ff08d8ee5ba8e834af5dd0080d10e66", "--", "renv/activate.R"))
}

source("renv/activate.R")
Expand Down

0 comments on commit b754f62

Please sign in to comment.