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

WISH: Flag and/or environment variable to declare script requires internet access #123

Open
HenrikBengtsson opened this issue Sep 14, 2022 · 0 comments

Comments

@HenrikBengtsson
Copy link
Owner

Issue

The default assumption is that R has access to the internet. For example, during startup, we might call foghorn to query the CRAN status of R packages we maintain. However, if there is no internet access (e.g. when being off the grid or running in airplane), such calls will fail - often with a long timeout period first.

Suggestion

Add a mechanism to skip startup scripts when there's no internet access. One idea is to introduce an environment variable
NO_INTERNET to be used in file names as:

~/.Rprofile.d/interactive=TRUE/when=daily/package=foghorn,NO_INTERNET!=TRUE.R

This file will be skipped if, and only if:

  • NO_INTERNET=TRUE

It will be processed if:

  • NO_INTERNET is not defined
  • NO_INTERNET is empty
  • NO_INTERNET=FALSE
  • NO_INTERNET is non-empty and not identical to TRUE
  • NO_INTERNET=true
  • NO_INTERNET=1
  • NO_INTERNET=0

Comment: It would be better if we could detect if an environment variable is defined or not, cf. Issue #89.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant