brew_cmd() runs a given Homebrew command. For more information about which additional arguments are supported for a command, see brew_help().

brew_cmd(
  cmd,
  args = character(),
  brew_cmd = find_brew_command(),
  echo = is_interactive(),
  ...
)

Arguments

cmd

The command to run (e.g., install)

args

Additional arguments for the command

brew_cmd

Optional: Location of brew command.

echo

Whether to print output and error messages to the screen. Defaults to TRUE for interactive sessions.

...

Additional arguments passed to processx::run()

Value

A list with components:

status

The exit status of the process. If this is NA, then the process was killed and had no exit status.

stdout

The standard output of the command, in a character scalar.

stderr

The standard error of the command, in a character scalar.

timeout

Whether the process was killed because of a timeout.

Examples

if (FALSE) {
brew_cmd("install", "unixodbc")
}