diff --git a/R/run_bin.R b/R/run_bin.R index d6758ec..ef19cc9 100644 --- a/R/run_bin.R +++ b/R/run_bin.R @@ -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") @@ -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 diff --git a/man/run_bin.Rd b/man/run_bin.Rd index ebace79..799798c 100644 --- a/man/run_bin.Rd +++ b/man/run_bin.Rd @@ -55,7 +55,11 @@ Usually this is not what the user wants, check \code{\link[=run]{run()}} for the \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")