Skip to content

Commit

Permalink
Adjust to new RStudio version numbering
Browse files Browse the repository at this point in the history
Closes #2397
  • Loading branch information
jennybc committed Feb 22, 2022
1 parent 41280ac commit e10df72
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions R/sitrep.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
#' @importFrom memoise memoise
NULL

check_for_rstudio_updates <- function(os = tolower(Sys.info()[["sysname"]]), version = rstudioapi::getVersion(), in_rstudio = rstudioapi::isAvailable()) {

check_for_rstudio_updates <- function(os = tolower(Sys.info()[["sysname"]]),
version = rstudioapi::versionInfo()$long_version,
in_rstudio = rstudioapi::isAvailable()) {
if (!in_rstudio) {
return()
}

url <- sprintf("https://www.rstudio.org/links/check_for_update?version=%s&os=%s&format=%s", version, os, "kvp")
url <- sprintf(
"https://www.rstudio.org/links/check_for_update?version=%s&os=%s&format=%s",
utils::URLencode(version, reserved = TRUE), os, "kvp"
)

tmp <- file_temp()
on.exit(file_delete(tmp))
Expand Down

0 comments on commit e10df72

Please # to comment.