Skip to content

Commit

Permalink
Fixed handling of missing packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Shians committed Aug 23, 2024
1 parent 2d454d8 commit 65ca5a6
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions R/get_exons.R
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,16 @@ package_check <- function(packages, req_versions) {
for (i in seq_along(packages)) {
package <- packages[i]
req_version <- req_versions[i]
if (package %in% utils::installed.packages()) {
if (packageVersion(package) < req_version) {
any_missing <- TRUE
message(glue::glue(
"required package '{package} (>= {req_version})' is not installed, please install using BiocManager::install({package})"
))
}
if (!package %in% utils::installed.packages()) {
any_missing <- TRUE
message(glue::glue(
"required package '{package} (>= {req_version})' is not installed, please install using BiocManager::install(\"{package}\")"
))
} else if (packageVersion(package) < req_version) {
any_missing <- TRUE
message(glue::glue(
"required package '{package} (>= {req_version})' is not installed, please install using BiocManager::install(\"{package}\")"
))
}
}

Expand Down

0 comments on commit 65ca5a6

Please sign in to comment.