wadpac / GGIR

Code corresponding to R package GGIR
https://wadpac.github.io/GGIR/
Apache License 2.0
94 stars 60 forks source link

Make `.onAttach` not call `chooseCRANmirror` #1140

Closed muschellij2 closed 3 months ago

muschellij2 commented 3 months ago

For startup/.onAttach, the available.packages calls contrib.url and will have special conditions if CRAN repo not set (getOption("repos") return "@CRAN@"): https://github.com/wch/r-source/blob/6ac28acf314b05b1a913504da10a79cf4fd487de/src/library/utils/R/packages.R#L830 this will call then call chooseCRANmirror https://github.com/wch/r-source/blob/6ac28acf314b05b1a913504da10a79cf4fd487de/src/library/utils/R/packages.R#L834 which will then ask for a mirror and if the code is running a script such as:

library(dplyr)
library(GGIR)
library(purrr)

there are issues.