From e10df7219989022771d369b06e7df1f94d19ed3d Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Tue, 22 Feb 2022 10:56:55 -0800 Subject: [PATCH] Adjust to new RStudio version numbering Closes #2397 --- R/sitrep.R | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/R/sitrep.R b/R/sitrep.R index 3aeab6b1f..e55e1e427 100644 --- a/R/sitrep.R +++ b/R/sitrep.R @@ -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))