Skip to content

Commit ddcb87f

Browse files
committed
clean up
1 parent 89f63d3 commit ddcb87f

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

R/acro_init.R

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,9 @@ get_python <- function() {
2323
#'
2424
#' @param envname Name of the conda environment
2525
init_conda <- function(envname) { # nocov
26-
envs <- reticulate::conda_list()
27-
exists <- any(envs$name == envname)
28-
29-
if (!exists) {
26+
if (condaenv_exists(envname = envname, conda = "auto")) {
3027
reticulate::conda_create(envname = envname, python_version = "3.12", channel = ch)
31-
reticulate::conda_install(envname, packages = acro_pkg, channel = ch)
28+
reticulate::conda_install(envname = envname, packages = acro_pkg, channel = ch)
3229
}
3330
reticulate::use_condaenv(envname, required = TRUE)
3431
}

0 commit comments

Comments
 (0)