Showing 1 of 3 files from the diff.
Other files ignored by Codecov

@@ -9,14 +9,15 @@
Loading
9 9
#' @inheritParams local_install
10 10
#' @param os,os_release The operating system and operating system release version, see
11 11
#'   <https://github.com/rstudio/r-system-requirements#operating-systems> for the
12 -
#'   list of supported operating systems.
12 +
#'   list of supported operating systems. If `NULL`, the default, these will be
13 +
#'   looked up using [distro::distro()].
13 14
#' @param execute,sudo If `execute` is `TRUE`, pak will execute the system
14 15
#'   commands (if any). If `sudo` is `TRUE`, pak will prepend the commands with
15 16
#'   [sudo](https://en.wikipedia.org/wiki/Sudo).
16 17
#' @param echo If `echo` is `TRUE` and `execute` is `TRUE`, echo the command output.
17 18
#' @return A character vector of commands needed to install the system requirements for the package (invisibly).
18 19
#' @export
19 -
local_system_requirements <- function(os, os_release, root = ".", execute = FALSE, sudo = execute, echo = FALSE) {
20 +
local_system_requirements <- function(os = NULL, os_release = NULL, root = ".", execute = FALSE, sudo = execute, echo = FALSE) {
20 21
  res <- remote(
21 22
    function(...) asNamespace("pak")$local_system_requirements_internal(...),
22 23
    list(os = os, os_release = os_release, root = root, execute = execute, sudo = sudo, echo = echo))
@@ -24,6 +25,12 @@
Loading
24 25
}
25 26
26 27
local_system_requirements_internal <- function(os, os_release, root, execute, sudo, echo) {
28 +
  if (is.null(os) || is.null(os_release)) {
29 +
    d <- distro::distro()
30 +
    os <- os %||% d$id
31 +
    os_release <- os_release %||% d$short_version
32 +
  }
33 +
27 34
  os_versions <- supported_os_versions()
28 35
29 36
  os <- match.arg(os, names(os_versions))
Files Coverage
R 35.18%
Project Totals (16 files) 35.18%
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 1%
9
        informational: true
10
    patch:
11
      default:
12
        target: auto
13
        threshold: 1%
14
        informational: true
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading