1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 01:22:25 +02:00

(v1.7.1.9029) unit test fix

This commit is contained in:
2021-08-21 10:20:05 +02:00
parent e4de7f5055
commit f0a4d29fe0
6 changed files with 19 additions and 14 deletions

Binary file not shown.

View File

@ -39,7 +39,11 @@ if (length(to_install) == 0) {
}
for (i in seq_len(length(to_install))) {
cat("Installing package", to_install[i], "\n")
tryCatch(install.packages(to_install[i], repos = "https://cran.rstudio.com/", dependencies = c("Depends", "Imports"), quiet = FALSE),
tryCatch(install.packages(to_install[i],
type = ifelse(.Platform$OS.type == "unix", "source", "binary"),
repos = "https://cran.rstudio.com/",
dependencies = c("Depends", "Imports"),
quiet = FALSE),
# message = function(m) invisible(),
warning = function(w) message(w$message),
error = function(e) message(e$message))
@ -51,9 +55,10 @@ if (length(to_update) == 0) {
message("\nNothing to update\n")
}
for (i in seq_len(length(to_update))) {
cat("Updating package", to_update[i], "\n")
cat("Updating package '", to_update[i], "' v", as.character(packageVersion(to_update[i])), "\n", sep = "")
tryCatch(update.packages(to_update[i], repos = "https://cran.rstudio.com/", ask = FALSE),
# message = function(m) invisible(),
warning = function(w) message(w$message),
error = function(e) message(e$message))
cat("Updated to '", to_update[i], "' v", as.character(packageVersion(to_update[i])), "\n", sep = "")
}