#248 System requirement tweaks

Merged Hadley Wickham hadley

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 2 files from the diff.

@@ -7,21 +7,27 @@
Loading
7 7
#' requirements for the queried operating system.
8 8
#'
9 9
#' @inheritParams local_install
10 -
#' @param os,os_release The operating system and operating system release version, see
11 -
#'   <https://github.com/rstudio/r-system-requirements#operating-systems> for the
12 -
#'   list of supported operating systems. If `NULL`, the default, these will be
13 -
#'   looked up using [distro::distro()].
10 +
#' @param os,os_release The operating system and operating system release
11 +
#'   version, e.g. "ubuntu", "debian", "centos", "redhat". See
12 +
#'   <https://github.com/rstudio/r-system-requirements#operating-systems> for
13 +
#'   all full list of supported operating systems.
14 +
#'
15 +
#'   If `NULL`, the default, these will be looked up using [distro::distro()].
14 16
#' @param execute,sudo If `execute` is `TRUE`, pak will execute the system
15 17
#'   commands (if any). If `sudo` is `TRUE`, pak will prepend the commands with
16 18
#'   [sudo](https://en.wikipedia.org/wiki/Sudo).
17 19
#' @param echo If `echo` is `TRUE` and `execute` is `TRUE`, echo the command output.
18 -
#' @return A character vector of commands needed to install the system requirements for the package (invisibly).
20 +
#' @return A character vector of commands needed to install the system
21 +
#'   requirements for the package.
19 22
#' @export
23 +
#' @examples
24 +
#' pkg_system_requirements("pak", "ubuntu", "20.04")
25 +
#' pkg_system_requirements("pak", "redhat", "7")
20 26
local_system_requirements <- function(os = NULL, os_release = NULL, root = ".", execute = FALSE, sudo = execute, echo = FALSE) {
21 27
  res <- remote(
22 28
    function(...) asNamespace("pak")$system_requirements_internal(...),
23 29
    list(os = os, os_release = os_release, root = root, package = NULL, execute = execute, sudo = sudo, echo = echo))
24 -
  invisible(res)
30 +
  if (execute) invisible(res) else res
25 31
}
26 32
27 33
#' @param package The package name to lookup system requirements for.
@@ -31,7 +37,7 @@
Loading
31 37
  res <- remote(
32 38
    function(...) asNamespace("pak")$system_requirements_internal(...),
33 39
    list(os = os, os_release = os_release, root = NULL, package = package, execute = execute, sudo = sudo, echo = echo))
34 -
  invisible(res)
40 +
  if (execute) invisible(res) else res
35 41
}
36 42
37 43
system_requirements_internal <- function(os, os_release, root, package, execute, sudo, echo) {

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
R -0.12% 18.92%
Project Totals (23 files) 18.92%
Loading