diff --git a/R/install.R b/R/install.R index d5aa0976..7d92f5e9 100644 --- a/R/install.R +++ b/R/install.R @@ -398,10 +398,10 @@ github_download_url <- function(version_number) { } # get version number of latest release -latest_released_version <- function(quiet=TRUE) { +latest_released_version <- function(quiet=TRUE, ...) { dest_file <- tempfile(pattern = "releases-", fileext = ".json") download_url <- "https://api.github.com/repos/stan-dev/cmdstan/releases/latest" - release_list_downloaded <- download_with_retries(download_url, dest_file, quiet = quiet) + release_list_downloaded <- download_with_retries(download_url, dest_file, quiet = quiet, ...) if (inherits(release_list_downloaded, "try-error")) { stop("GitHub download of release list failed with error: ", attr(release_list_downloaded, "condition")$message, diff --git a/R/zzz.R b/R/zzz.R index 1da0fc2c..0a255258 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -14,7 +14,7 @@ startup_messages <- function() { default = identical(tolower(Sys.getenv("CMDSTANR_NO_VER_CHECK")), "true") )) if (!skip_version_check) { - latest_version <- try(suppressWarnings(latest_released_version()), silent = TRUE) + latest_version <- try(suppressWarnings(latest_released_version(retries = 0)), silent = TRUE) current_version <- try(cmdstan_version(), silent = TRUE) if (!inherits(latest_version, "try-error") && !inherits(current_version, "try-error")