From 624cbb2fc5bfde0af899e28b53619fecd9fc5be0 Mon Sep 17 00:00:00 2001 From: luciorq Date: Mon, 21 Oct 2024 15:27:25 -0400 Subject: [PATCH] refactor: remove dependency on pipe --- R/install_packages.R | 6 ++---- R/run.R | 4 ++-- man/run.Rd | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/R/install_packages.R b/R/install_packages.R index ad7521b..d95b124 100644 --- a/R/install_packages.R +++ b/R/install_packages.R @@ -20,8 +20,7 @@ install_packages <- function(packages, packages = NULL, env_name = env_name, verbose = verbose - ) |> - invisible() + ) } channels_arg <- format_channels_args( additional_channels, @@ -42,7 +41,6 @@ install_packages <- function(packages, packages, verbose = verbose ) - px_res$stdout |> - cat() + cat(px_res$stdout) invisible(px_res$status) } diff --git a/R/run.R b/R/run.R index ef269d1..d8b5e89 100644 --- a/R/run.R +++ b/R/run.R @@ -45,10 +45,10 @@ #' run("ls", "-l") #' #' ## Run a command in a specific Conda environment -#' run("python script.py", env_name = "my-conda-env") +#' run("python", "script.py", env_name = "my-python-env") #' #' ## Run a command with additional arguments -#' run("my-command", "--arg1", "--arg2=value", env_name = "my-conda-env") +#' run("my-command", "--arg1", "--arg2=value", env_name = "my-python-env") #' } #' @seealso #' \code{\link{install_micromamba}}, \code{\link{create_env}} diff --git a/man/run.Rd b/man/run.Rd index 66af632..94ac63e 100644 --- a/man/run.Rd +++ b/man/run.Rd @@ -64,10 +64,10 @@ This is particularly useful for reproducible research and ensuring that specific run("ls", "-l") ## Run a command in a specific Conda environment -run("python script.py", env_name = "my-conda-env") +run("python", "script.py", env_name = "my-python-env") ## Run a command with additional arguments -run("my-command", "--arg1", "--arg2=value", env_name = "my-conda-env") +run("my-command", "--arg1", "--arg2=value", env_name = "my-python-env") } } \seealso{