Skip to content

Commit 5266f0f

Browse files
authored
Merge pull request #656 from williamlai2/patch-1
Update install.R
2 parents 743bf8f + 874fe67 commit 5266f0f

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

R/install.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ check_rtools4x_windows_toolchain <- function(fix = FALSE, quiet = FALSE) {
509509
stop(
510510
"\n", rtools_version, " was not found but is required to run CmdStan with R version ",
511511
R.version$major, ".", R.version$minor, ".",
512-
"\nPlease install ", rtools_version, " and run check_cmdstan_toolchain().",
512+
"\nPlease install ", rtools_version, " and run cmdstanr::check_cmdstan_toolchain().",
513513
call. = FALSE
514514
)
515515
}
@@ -518,7 +518,7 @@ check_rtools4x_windows_toolchain <- function(fix = FALSE, quiet = FALSE) {
518518
if (grepl("\\(|)| ", rtools_path)) {
519519
stop(
520520
"\n", rtools_version, " is installed in a path with spaces or brackets, which is not supported.",
521-
"\nPlease reinstall ", rtools_version, " to a valid path, restart R, and then run check_cmdstan_toolchain().",
521+
"\nPlease reinstall ", rtools_version, " to a valid path, restart R, and then run cmdstanr::check_cmdstan_toolchain().",
522522
call. = FALSE
523523
)
524524
}
@@ -527,7 +527,7 @@ check_rtools4x_windows_toolchain <- function(fix = FALSE, quiet = FALSE) {
527527
if (!fix) {
528528
stop(
529529
"\n", rtools_version, " installation found but the toolchain was not installed.",
530-
"\nRun check_cmdstan_toolchain(fix = TRUE) to fix the issue.",
530+
"\nRun cmdstanr::check_cmdstan_toolchain(fix = TRUE) to fix the issue.",
531531
call. = FALSE
532532
)
533533
} else {
@@ -615,13 +615,13 @@ check_unix_make <- function() {
615615
"The 'make' tool was not found. ",
616616
"Please install the command line tools for Mac with 'xcode-select --install' ",
617617
"or install Xcode from the app store. ",
618-
"Then restart R and run check_cmdstan_toolchain().",
618+
"Then restart R and run cmdstanr::check_cmdstan_toolchain().",
619619
call. = FALSE
620620
)
621621
} else {
622622
stop(
623623
"The 'make' tool was not found. ",
624-
"Please install 'make', restart R, and then run check_cmdstan_toolchain().",
624+
"Please install 'make', restart R, and then run cmdstanr::check_cmdstan_toolchain().",
625625
call. = FALSE
626626
)
627627
}
@@ -638,14 +638,14 @@ check_unix_cpp_compiler <- function() {
638638
"A suitable C++ compiler was not found. ",
639639
"Please install the command line tools for Mac with 'xcode-select --install' ",
640640
"or install Xcode from the app store. ",
641-
"Then restart R and run check_cmdstan_toolchain().",
641+
"Then restart R and run cmdstanr::check_cmdstan_toolchain().",
642642
call. = FALSE
643643
)
644644
} else {
645645
stop(
646646
"A C++ compiler was not found. ",
647647
"Please install the 'clang++' or 'g++' compiler, restart R, ",
648-
"and run check_cmdstan_toolchain().",
648+
"and run cmdstanr::check_cmdstan_toolchain().",
649649
call. = FALSE
650650
)
651651
}

tests/testthat/test-install.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ test_that("toolchain checks on Unix work", {
127127
path_backup <- Sys.getenv("PATH")
128128
Sys.setenv("PATH" = "")
129129
if (os_is_macos()) {
130-
err_msg_cpp <- "A suitable C++ compiler was not found. Please install the command line tools for Mac with 'xcode-select --install' or install Xcode from the app store. Then restart R and run check_cmdstan_toolchain()."
131-
err_msg_make <- "The 'make' tool was not found. Please install the command line tools for Mac with 'xcode-select --install' or install Xcode from the app store. Then restart R and run check_cmdstan_toolchain()."
130+
err_msg_cpp <- "A suitable C++ compiler was not found. Please install the command line tools for Mac with 'xcode-select --install' or install Xcode from the app store. Then restart R and run cmdstanr::check_cmdstan_toolchain()."
131+
err_msg_make <- "The 'make' tool was not found. Please install the command line tools for Mac with 'xcode-select --install' or install Xcode from the app store. Then restart R and run cmdstanr::check_cmdstan_toolchain()."
132132
} else {
133-
err_msg_cpp <- "A C++ compiler was not found. Please install the 'clang++' or 'g++' compiler, restart R, and run check_cmdstan_toolchain()."
134-
err_msg_make <- "The 'make' tool was not found. Please install 'make', restart R, and then run check_cmdstan_toolchain()."
133+
err_msg_cpp <- "A C++ compiler was not found. Please install the 'clang++' or 'g++' compiler, restart R, and run cmdstanr::check_cmdstan_toolchain()."
134+
err_msg_make <- "The 'make' tool was not found. Please install 'make', restart R, and then run cmdstanr::check_cmdstan_toolchain()."
135135
}
136136
expect_error(
137137
check_unix_cpp_compiler(),

0 commit comments

Comments
 (0)