Skip to content

Commit

Permalink
docs: rework example in run_bin
Browse files Browse the repository at this point in the history
  • Loading branch information
luciorq committed Dec 4, 2024
1 parent d6e17ec commit c6fa3b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 7 additions & 2 deletions R/run_bin.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
#' \dontrun{
#' # Example assumes that 'my-env' exists and contains 'python'
#' # Run 'python' with a script in 'my-env' environment
#' condathis::run_bin("python", "script.py", env_name = "my-env", verbose = "silent")
#' condathis::run_bin(
#' "python", "-c", "import sys; print(sys.version)",
#' env_name = "my-env",
#' verbose = "output"
#' )
#'
#' # Run 'ls' command with additional arguments
#' condathis::run_bin("ls", "-la", env_name = "my-env")
Expand All @@ -27,7 +31,8 @@ run_bin <- function(
verbose = "silent",
error = c("cancel", "continue"),
stdout = "|",
stderr = "|") {
stderr = "|"
) {
error <- rlang::arg_match(error)
if (isTRUE(identical(error, "cancel"))) {
error_var <- TRUE
Expand Down
6 changes: 5 additions & 1 deletion man/run_bin.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c6fa3b4

Please sign in to comment.