-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add pkg_upgrade()
#289
base: main
Are you sure you want to change the base?
Add pkg_upgrade()
#289
Conversation
Should there be a helper to upgrade all installed packages, equivalent to |
There will be a |
I'd like to cheer on this pull request, and second the suggestion that there be a helper function to upgrade all packages. For someone who is not deep into the internals of |
No, it will not break anything. |
Awesome, thanks for the quick reply. Great that it won't break anything, but I am assuming that it will not give all the benefits either, such as keeping the downloaded packages to prevent redownloading on a second install (such as for a So I put together a quick and dirty shim to query old packages on the fly and then install the most recent version with update.packages <- function(...) {
cat("Using old.packages() and pak() to update packages ...\n")
d.outdated <- old.packages() |> tibble::as_tibble()
if (nrow(d.outdated)>0) {
pak::pak(d.outdated$Package)
} else {
cat("No outdated packages found.\n")
}
} I realize that this is by no means the same as having a real In particular, this does not pick up outdated packages on GitHub and such, but it does add a freshly installed package to |
Indeed, such function could be really useful. if (length(pkgs <- setdiff(rownames(old.packages()), "pak")) > 0) pak::pkg_install(pkgs) |
Yay for this FR—I assume it's the same as what I was coming to request, which is an equivalent to |
No description provided.