Skip to content

Commit

Permalink
feat(assets_info): Return assets versions as invisible table (#103)
Browse files Browse the repository at this point in the history
* feat(assets_info): Return assets versions as invisible table

And use `message()` instead of `cat()` to make it easier to suppress the printed output

* chore: use `cat()` for now instead of `message()`
  • Loading branch information
gadenbuie authored Jul 2, 2024
1 parent 45868e5 commit 163059d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion R/assets.R
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,21 @@ assets_info <- function() {
sep = ""
)

invisible()
versions <- vapply(
strsplit(installed_versions, "shinylive-", fixed = TRUE),
FUN.VALUE = character(1),
function(x) x[[2]]
)

data <- data.frame(
version = versions,
path = installed_versions,
is_assets_version = versions == assets_version()
)

class(data) <- c("tbl_df", "tbl", "data.frame")

invisible(data)
}


Expand Down

0 comments on commit 163059d

Please sign in to comment.