Skip to content

Commit 62fd754

Browse files
committed
Fix test url, add version checking to utils
1 parent 11853ae commit 62fd754

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

R/install.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ rtools4x_toolchain_path <- function() {
866866
if (arch_is_aarch64()) {
867867
toolchain <- "aarch64-w64-mingw32.static.posix"
868868
} else {
869-
if (rtools4x_version() < "44" || Sys.getenv("CMDSTANR_USE_MSYS_TOOLCHAIN") != "") {
869+
if (rtools4x_version() < "44" || Sys.getenv("CMDSTANR_USE_MSYS_TOOLCHAIN") != "" || cmdstan_version() < "2.35.0") {
870870
toolchain <- ifelse(is_ucrt_toolchain(), "ucrt64", "mingw64")
871871
} else {
872872
toolchain <- "x86_64-w64-mingw32.static.posix"

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ arch_is_aarch64 <- function() {
9696
make_cmd <- function() {
9797
if (Sys.getenv("MAKE") != "") {
9898
Sys.getenv("MAKE")
99-
} else if (os_is_windows() && !os_is_wsl() && (rtools4x_version() < "44" || Sys.getenv("CMDSTANR_USE_MSYS_TOOLCHAIN") != "")) {
99+
} else if (os_is_windows() && !os_is_wsl() && (rtools4x_version() < "44" || Sys.getenv("CMDSTANR_USE_MSYS_TOOLCHAIN") != "" || cmdstan_version() < "2.35.0")) {
100100
"mingw32-make.exe"
101101
} else {
102102
"make"

tests/testthat/test-install.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ test_that("install_cmdstan() works with version and release_url", {
9898
expect_message(
9999
expect_output(
100100
install_cmdstan(dir = dir, overwrite = TRUE, cores = 4,
101-
release_url = "https://github.com/stan-dev/cmdstan/releases/download/v2.33.0/cmdstan-2.35.0.tar.gz",
101+
release_url = "https://github.com/stan-dev/cmdstan/releases/download/v2.35.0/cmdstan-2.35.0.tar.gz",
102102
wsl = os_is_wsl()),
103103
"Compiling, linking C++ code",
104104
fixed = TRUE

0 commit comments

Comments
 (0)