diff --git a/R/install.R b/R/install.R index 2af78f7506..7107bd98c2 100644 --- a/R/install.R +++ b/R/install.R @@ -193,5 +193,25 @@ install_troublesome_pkgs <- function(libpath = .libPaths()[1]) { } ) } + + if (is_windows()) { + switch(short_r_version, + "4.0" = { + install_missing_pkgs( + packages = "terra", + packages_to_install = "url::https://packagemanager.posit.co/cran/latest/bin/windows/contrib/4.0/terra_1.7-29.zip", + libpath = libpath + ) + }, + "3.6" = { + install_missing_pkgs( + packages = "terra", + packages_to_install = "url::https://packagemanager.posit.co/cran/latest/bin/windows/contrib/3.6/terra_1.7-29.zip", + libpath = libpath + ) + } + ) + } + invisible() } diff --git a/inst/gha/gha-adjust-packages-to-install.R b/inst/gha/gha-adjust-packages-to-install.R index c655d6aa33..839dd62419 100644 --- a/inst/gha/gha-adjust-packages-to-install.R +++ b/inst/gha/gha-adjust-packages-to-install.R @@ -14,6 +14,18 @@ adjust_pkgs <- function(pkgs_to_install = "rstudio/shiny,rstudio/bslib", r_versi } } + if (is_windows) { + switch(short_r_version, + "4.0" = { + replace_or_add("any::terra", "url::https://packagemanager.posit.co/cran/latest/bin/windows/contrib/4.0/terra_1.7-29.zip") + }, + "3.6" = { + replace_or_add("any::terra", "url::https://packagemanager.posit.co/cran/latest/bin/windows/contrib/3.6/terra_1.7-29.zip") + } + ) + + } + if (is_linux) { switch(short_r_version, "4.2" = {