Private implementation function that executes a bbi call (bbi ...) with processx::process$new()

bbi_exec(
  .cmd_args,
  .dir = ".",
  .verbose = FALSE,
  .wait = FALSE,
  .bbi_exe_path = getOption("bbr.bbi_exe_path"),
  .check_status = TRUE,
  ...
)

Arguments

.cmd_args

A character vector of command line arguments for the execution call

.dir

The working directory to run command in. Defaults to "."

.verbose

Print stdout and stderr as process runs #### NOT IMPLEMENTED?

.wait

If true, don't return until process has exited.

.bbi_exe_path

Path to bbi executable

.check_status

Whether to signal an error if the command has a non-zero exit code.

...

arguments to pass to processx::process$new()

Value

An S3 object of class bbi_process with the following elements

  • process -- The process object (see ?processx::process$new for more details on what you can do with this).

  • stdout -- the stdout and stderr from the process, if .wait = TRUE. If .wait = FALSE this contain a message with the tempfile path where stdout and stderr have been redirected.

  • bbi -- character scalar with the execution path used for bbi.

  • cmd_args -- character vector of all command arguments passed to the process.

  • working_dir -- the directory the command was run in, passed through from .dir argument.