Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List known platforms in pkg_sysreqs() documentation #666

Merged
merged 3 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ Config/Needs/deploy:
processx
Config/testthat/edition: 3
Encoding: UTF-8
RoxygenNote: 7.2.3.9000
RoxygenNote: 7.3.2
Biarch: true
19 changes: 15 additions & 4 deletions R/sysreqs.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,16 @@ sysreqs_fix_installed <- function(packages = NULL,
#' Calculate system requirements of one of more packages
#'
#' @inheritParams pkg_install
#' @param sysreqs_platform System requirements platform. If `NULL`, then the
#' `sysreqs_platform` \eval{man_config_link("configuration option")}
#' is used, which defaults to the current platform. Set this option if
#' \eval{.packageName} does not detect your platform correctly.
#' @param sysreqs_platform System requirements platform.
#'
#' If `NULL`, then the `sysreqs_platform`
#' \eval{man_config_link("configuration option")} is used, which defaults to
#' the current platform.
#'
#' Set this option if to one of \eval{platforms()} if \eval{.packageName}
#' fails to correctly detect your platform or if you want to see the system
#' requirements for a different platform.
#'
#' @return List with entries:
#' * `os`: character string. Operating system.
#' * `distribution`: character string. Linux distribution, `NA` if the
Expand Down Expand Up @@ -197,3 +203,8 @@ print.pak_sysreqs <- function(x, ...) {
class(x) <- setdiff(class(x), "pak_sysreqs")
NextMethod("[")
}


platforms <- function() {
paste0('\\code{"', sort(sysreqs_platforms()$distribution), '"}', collapse = ", ")
}
15 changes: 10 additions & 5 deletions man/pkg_sysreqs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading