Skip to content

Commit

Permalink
fix: handling of platform arg when yaml file used
Browse files Browse the repository at this point in the history
  • Loading branch information
luciorq committed Nov 6, 2024
1 parent 7329b2d commit 7094100
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: condathis
Title: Run Any CLI Tool on a Conda Environment
Version: 0.0.6.9005
Version: 0.0.6.9006
Authors@R: c(
person("Lucio", "Queiroz", , "[email protected]",
role = c("aut", "cre", "cph"),
Expand Down
5 changes: 5 additions & 0 deletions R/create_env.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ create_env <- function(
channels
)
method_to_use <- method[1]
platform_args <- NULL
if (isFALSE(is.null(packages))) {
platform_args <- define_platform(
packages = packages,
Expand All @@ -101,6 +102,10 @@ create_env <- function(
platform_args <- NULL
}

if (isFALSE(is.null(platform)) && isTRUE(is.null(platform_args))) {
platform_args <- c("--platform", platform)
}

if (isTRUE(method_to_use %in% c("native", "auto"))) {
if (env_exists(env_name = env_name) && isFALSE(overwrite)) {
pkg_list_res <- list_packages(env_name = env_name, verbose = verbose)
Expand Down

0 comments on commit 7094100

Please sign in to comment.