Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 13, 2023
1 parent e7337f3 commit c998264
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: insight
Title: Easy Access to Model Information for Various Model Objects
Version: 0.19.4.2
Version: 0.19.4.3
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down
7 changes: 6 additions & 1 deletion R/check_if_installed.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ check_if_installed <- function(package,
minimum_version <- .safe(.get_dep_version(dep = package))
}

# sanity check for equal length of package and minimum_version
if (!is.null(minimum_version) && length(package) != length(minimum_version)) {
minimum_version <- NULL
}

## Test
if (!all(is_installed)) {
# only keep not-installed packages
Expand Down Expand Up @@ -160,7 +165,7 @@ print.check_if_installed <- function(x, ...) {
dep_string <- unlist(strsplit(dep_string, ">", fixed = TRUE))
gsub("[^0-9.]+", "", dep_string[2])
})
out <- unlist(out)
out <- unlist(compact_list(out))
if (all(is.na(out)) || !length(out)) {
out <- NULL
}
Expand Down

0 comments on commit c998264

Please sign in to comment.