Skip to content

Commit

Permalink
Faster check for whether a package is on disk (#1777)
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo authored Feb 25, 2025
1 parent ff850cc commit a14f3ed
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions R/session.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,7 @@ detect_installed <- function(info) {
}

is_on_disk <- function(pkg) {
# A warning is emitted if the package was removed from disk
suppressWarnings(
nzchar(system.file(package = pkg))
)
any(file.exists(file.path(.libPaths(), pkg)))
}

pkg_version_info <- function(pkg,
Expand Down

0 comments on commit a14f3ed

Please sign in to comment.