-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
available_on_cran
should set R_CRAN_SRC
environment variable when calling tools:::CRAN_archive_db
#77
Comments
I don't know if there is a good reason for In any case, if I understand correctly, you can already use the different mirror, by setting that env var, so I don't think any change is needed in available. |
available_on_cran
should set R_CRAN_SRC
environment variable when calling tools::: CRAN_archive_db
available_on_cran
should set R_CRAN_SRC
environment variable when calling tools:::CRAN_archive_db
|
There is no guarantee that setting the current repo will make it "just work". What if that is offline or slow, and the main CRAN site is online? And even if the current mirror is online, the main site has more recent data. |
Btw.
|
That's fair. I guess I expected that |
|
Discovered when running the following, with my system unable to connect to CRAN.R-project.org:
Issue:
Currently,
available_on_cran()
callstools:::CRAN_archive_db()
. By default, tools.R uses "https://CRAN.R-project.org" (obtained from.get_standard_repository_URLs()
) as the base URL to fetch, unlessSys.getenv("R_CRAN_SRC")
is set.This differs from the expected behavior, which would be to use a mirror or the value from
repos
.A possible solution would be to set
R_CRAN_SRC
when callingtools:::CRAN_archive_db()
to therepos
parameter. Confirmed by settingSys.setenv(R_CRAN_SRC = "https://cloud.r-project.org")
and re-runningavailable::available("testpkg")
.The text was updated successfully, but these errors were encountered: