r-lib / remotes

Install R packages from GitHub, GitLab, Bitbucket, git, svn repositories, URLs
https://remotes.r-lib.org/
Other
332 stars 152 forks source link

install_local: avoid internet if "upgrade = never" (?) #763

Open scottkosty opened 1 year ago

scottkosty commented 1 year ago

I was getting a hang in one of my test scripts, and it turned out to be because install_local() was attempting to use the internet connection and the connection was really bad. If upgrade is "never", would it be reasonable to not use the internet connection?

To reproduce:

  1. Go to a coffee shop in a small remote (pun intended!) village in Spain that supposedly has internet. I think any one will do.
  2. Run remotes::install_local("path/to/package", upgrade = "never").

Interestingly, the code runs fine if I disable WiFi. I'm guessing the download is wrapped in a try()?

By the way, thanks for your work on this very helpful package!

gaborcsardi commented 11 months ago

It is unlikely that we are going to implement this, but it might be a good feature for https://github.com/r-lib/pak, where we focus our development today.

scottkosty commented 11 months ago

Sounds good, thanks for taking a look!