Skip to content

Commit

Permalink
#13 see if upgrading renv fixes problem
Browse files Browse the repository at this point in the history
  • Loading branch information
egouldo committed Nov 6, 2023
1 parent 57a0949 commit 5267566
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 30 deletions.
9 changes: 3 additions & 6 deletions renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3294,13 +3294,10 @@
},
"renv": {
"Package": "renv",
"Version": "1.0.2",
"Source": "Repository",
"Version": "1.0.3",
"OS_type": null,
"Repository": "CRAN",
"Requirements": [
"utils"
],
"Hash": "4b22ac016fe54028b88d0c68badbd061"
"Source": "Repository"
},
"reprex": {
"Package": "reprex",
Expand Down
27 changes: 3 additions & 24 deletions renv/activate.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local({

# the requested version of renv
version <- "1.0.2"
version <- "1.0.3"
attr(version, "sha") <- NULL

# the project directory
Expand Down Expand Up @@ -1034,19 +1034,6 @@ local({

}


renv_bootstrap_in_rstudio <- function() {
commandArgs()[[1]] == "RStudio"
}

# Used to work around buglet in RStudio if hook uses readline
renv_bootstrap_flush_console <- function() {
tryCatch({
tools <- as.environment("tools:rstudio")
tools$.rs.api.sendToConsole("", echo = FALSE, focus = FALSE)
}, error = function(cnd) {})
}

renv_json_read <- function(file = NULL, text = NULL) {

jlerr <- NULL
Expand Down Expand Up @@ -1185,16 +1172,8 @@ local({
# construct full libpath
libpath <- file.path(root, prefix)

if (renv_bootstrap_in_rstudio()) {
# RStudio only updates console once .Rprofile is finished, so
# instead run code on sessionInit
setHook("rstudio.sessionInit", function(...) {
renv_bootstrap_exec(project, libpath, version)
renv_bootstrap_flush_console()
})
} else {
renv_bootstrap_exec(project, libpath, version)
}
# run bootstrap code
renv_bootstrap_exec(project, libpath, version)

invisible()

Expand Down

0 comments on commit 5267566

Please sign in to comment.