cmd_run
: Run the command.
cmd_background
: Run the command in the background.
cmd_help
: Print the help document for this command.
cmd_run(
command,
stdout = TRUE,
stderr = TRUE,
stdin = NULL,
timeout = NULL,
verbose = TRUE
)cmd_background(
command,
stdout = NULL,
stderr = NULL,
stdin = NULL,
verbose = TRUE
)
cmd_help(command, stdout = NULL, stderr = NULL, verbose = TRUE)
cmd_run
: Exit status invisiblely.
cmd_background
: Returns the process ID, which can be terminated manually
using tools::pskill()
. You can also use sys::exec_status()
to check
the process's exit status.
cmd_help
: the input command
invisiblely.
A command
object.
How output streams of the child process are processed. Possible values are:
TRUE
: print the child output in R console.
FALSE
: suppress output stream
string: name or path of file to redirect output
connection
: a writable R connection
object
function
: a callback function (including purrr-like lambda syntax) with
one argument accepting a raw vector (use as_text()
to
convert to text).
For cmd_background()
, only a string (file path), or a single boolean value
can be used.
For cmd_help()
, only a string (file path), connection
, or function
can
be used.
should the input be diverted? A character string naming a file.
Timeout in seconds. This is a limit for the elapsed time running command in the separate process.
A single boolean value indicating whether the command execution should be verbose.
cmd_wd()
/cmd_envvar()
/cmd_envpath()