projects
/
rnaseq-cwl-training.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c4b6e23
)
set CRAN url if default is "@CRAN@"
author
Zhian N. Kamvar <zkamvar@gmail.com>
Wed, 2 Dec 2020 17:35:13 +0000
(09:35 -0800)
committer
François Michonneau <francois.michonneau@gmail.com>
Thu, 3 Dec 2020 14:49:03 +0000
(15:49 +0100)
This will fix #526
bin/dependencies.R
patch
|
blob
|
history
diff --git
a/bin/dependencies.R
b/bin/dependencies.R
index ad5afe78d1d4e88edcc860544fa1fa59db6043f1..640b3e248983fd57b4be98b4e6c2b0bd846c5ce7 100644
(file)
--- a/
bin/dependencies.R
+++ b/
bin/dependencies.R
@@
-9,6
+9,12
@@
install_required_packages <- function(lib = NULL, repos = getOption("repos", def
c("rprojroot", "desc", "remotes", "renv"),
rownames(installed.packages(lib.loc = lib))
)
c("rprojroot", "desc", "remotes", "renv"),
rownames(installed.packages(lib.loc = lib))
)
+ # The default installation of R will have "@CRAN@" as the default repository, which directs contrib.url() to either
+ # force the user to choose a mirror if interactive or fail if not. Since we are not interactve, we need to force the
+ # mirror here.
+ if ("@CRAN@" %in% repos) {
+ repos <- c(CRAN = "https://cran.rstudio.com/")
+ }
install.packages(missing_pkgs, lib = lib, repos = repos)
install.packages(missing_pkgs, lib = lib, repos = repos)