r-lib / remotes

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

Should update_packages() return warning instead of error if a repo is no longer available #581

Closed remlapmot closed 3 years ago

remlapmot commented 3 years ago

I run remotes::update_packages() regularly to check for updates and find it incredibly useful.

Recently a repo I installed a package from has been made private, as such update_packages() now fails with an error message to this effect.

> remotes::update_packages()
Error: HTTP error 404.
  Not Found

  Did you spell the repo owner (`Osmahmoud`) and repo name (`SlopeHunter`) correctly?
  - If spelling is correct, check that you have the required permissions to access the repo.

It would be more useful to me if there was an option to toggle the behaviour, such that if some repos have been taken down that I could have a warning with a list of repos with 404 errors, but my other ones were updated.

Would you consider adding such an option, or accepting a PR to that effect?

Or maybe I should pass update_packages() a list of my remote packages with the offending one removed?

jimhester commented 3 years ago

Passing update_packages() a list with the offending package removed is the best workaround I think.