Skip to content

Commit

Permalink
warn that pak doesn't respect force=T
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferis committed Sep 7, 2023
1 parent 50205e4 commit 9a5e420
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/update.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ selfupdate <- function(source = c('GITHUB', 'CRAN'),
method=match.arg(method)
pkgspec=ifelse(source=='CRAN', "natmanager", "natverse/natmanager")
if(method=='pak') {
pak::pkg_install(pkgspec, upgrade=upgrade.dependencies, ...)
if(isTRUE(force))
warning("Ignoring force=T. To force pak to reinstall an up-to-date package",
"you must first delete it with:\n",
"`remove.packages()`", immediate.=TRUE)
pak::pkg_install(pkgspec, upgrade=upgrade.dependencies, ...)
}
else if (source == 'CRAN') {
remotes::install_cran(pkgspec, ...)
Expand Down

0 comments on commit 9a5e420

Please sign in to comment.