Skip to content
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

CRAN_urls() ignores pkgdown.internet = FALSE *and* overwrites default proxy #184

Open
sergiocorreia opened this issue Feb 8, 2024 · 0 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@sergiocorreia
Copy link

sergiocorreia commented Feb 8, 2024

Got a very similar error to #177 when trying to build a package website from behind a firewall. Until maybe 3-6 months this worked:

options(pkgdown.internet = FALSE)
pkgdown::build_site()

Now we get an error from downlit which we traced to this (premature?) optimization:

CRAN_urls <- function() {
  # Substantially faster to use RStudio mirror: in my testing this reduced
  # download time from ~2s to 0.6s
  withr::local_envvar(R_CRAN_WEB = "https://cran.rstudio.com")
  tools::CRAN_package_db()
}

This overwrites the R_CRAN_WEB variable (thus disabling our internal proxy) and then fails ungracefully.

Maybe as a compromise, CRAN_urls() should only change R_CRAN_WEB if it has the default values? Or maybe there's a way to completely avoid relying on the web when pkgdown.internet = FALSE is set?

Thanks!

@hadley hadley added the bug an unexpected problem or unintended behavior label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants