Skip to content

Commit

Permalink
fix(format.packages_info): Handle no packages case
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie committed Aug 15, 2024
1 parent 96bdc9b commit 84e0b4e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/package-info.R
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ abbrev_long_sha <- function(x) {
#' @export

format.packages_info <- function(x, ...) {
if (nrow(x) == 0) {
return(cli::col_grey("No packages."))
}

unloaded <- is.na(x$loadedversion)
flib <- function(x) ifelse(is.na(x), "?", as.integer(x))
Expand Down

0 comments on commit 84e0b4e

Please # to comment.