powered by
Run a command line program and wait until it terminates.
run( command, ..., input = NULL, error_on_status = TRUE, wd = NULL, timeout = Inf, env = NULL )
the command to run
the arguments pass to the program, supports the big bang operator !!!
!!!
text pass to stdin
raise an error if return code is not 0.
working directory
throw an error after this amount of time in second
additional environment variables
The stdout of the program in a scalar character. It may contain a trailing newline. Use trimws() to ensure the trailing newline is trimmed.
trimws()
# NOT RUN { git <- function(...) cliff::run("git", ...) git("log", git("rev-parse", "--abbrev-ref", "HEAD"), "-n1") # } # NOT RUN { # }
Run the code above in your browser using DataLab