Skip to content

Commit

Permalink
Merge pull request #201 from zhanghao-njmu/develop
Browse files Browse the repository at this point in the history
Fix some bugs
  • Loading branch information
zhanghao-njmu authored Nov 2, 2023
2 parents 049a7d0 + db7e6da commit e445153
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -558,13 +558,15 @@ check_Python <- function(packages, envname = NULL, conda = "auto", force = FALSE
check_R <- function(packages, install_methods = c("BiocManager::install", "install.packages", "devtools::install_github"), lib = .libPaths()[1], force = FALSE) {
status_list <- list()
for (pkg in packages) {
version <- NULL
if (grepl("/", pkg)) {
# github package
pkg_name <- strsplit(pkg, split = "/|@|==", perl = TRUE)[[1]][[2]]
version <- NULL
} else {
pkg_name <- strsplit(pkg, split = "@|==", perl = TRUE)[[1]][[1]]
version <- strsplit(pkg, split = "@|==", perl = TRUE)[[1]][[2]]
if (length(strsplit(pkg, split = "@|==", perl = TRUE)[[1]]) > 1) {
version <- strsplit(pkg, split = "@|==", perl = TRUE)[[1]][[2]]
}
}
if (is.null(version)) {
force_update <- isTRUE(force)
Expand Down

0 comments on commit e445153

Please sign in to comment.