lam_run_system_command: Invoke a system command and check to see if it was successful

Description Usage Arguments Value

View source: R/utils.R

Description

This is a wrapper around system() with some extra bells and whistles.

Usage

1
lam_run_system_command(cmd, capture_output = FALSE, quiet = lam_is_quiet())

Arguments

cmd

String, a system command

capture_output

Do we want the actual output of the command returned? Useful when trying to generate text. This is passed directly to tne intern parameter of system().

quiet

Set to FALSE to reduce verbosity of lambdar messages. Note that system commands may still write to the terminal.

Value

If capture_output is FALSE, invisibly returns the exit code of the command, as long as that is zero. Any other exit code throws an error. If capture_output is TRUE, returns whatever the text output of the command is.


lewinfox/lambdar documentation built on Dec. 21, 2021, 10:43 a.m.