diff --git a/NEWS.md b/NEWS.md index 10789b0..c988d98 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,9 +4,12 @@ ## New features +* `install_micromamba()` now tries to download an uncompressed version of the micromamba binary if `untar()` fails + because of missing `bzip2` system library. (#10 and #14) + ## Minor improvements and fixes -* Internal `micromamba` version bump to "2.0.2-1". +* Internal `micromamba` version bump to "2.0.2-2". # condathis 0.0.6 diff --git a/R/create_env.R b/R/create_env.R index f2f8bcb..93f2b1f 100644 --- a/R/create_env.R +++ b/R/create_env.R @@ -70,7 +70,7 @@ create_env <- function( method <- rlang::arg_match(method) env_file_path <- NULL - if (!is.null(env_file)) { + if (isFALSE(is.null(env_file))) { if (fs::file_exists(env_file)) { env_file_path <- fs::path(env_file) packages_arg <- c("-f", env_file_path) diff --git a/R/install_micromamba.R b/R/install_micromamba.R index e0ac84c..810706a 100644 --- a/R/install_micromamba.R +++ b/R/install_micromamba.R @@ -5,7 +5,7 @@ #' to create and manage conda environments. #' #' @param micromamba_version Character string specifying the version of Micromamba to download. -#' Defaults to `"2.0.2-1"`. +#' Defaults to `"2.0.2-2"`. #' #' @param timeout_limit Numeric value specifying the timeout limit for downloading the Micromamba #' binaries, in seconds. Defaults to `3600` seconds (1 hour). @@ -106,7 +106,6 @@ install_micromamba <- function(micromamba_version = "2.0.2-2", fs::file_delete(full_dl_path) } - # NOTE: @luciorq Attempt to solver #10 and #14 if (isFALSE(nzchar(Sys.which("bzip2")) && fs::file_exists(umamba_bin_path))) { download_url <- paste0( base_url, "download/", micromamba_version, "/micromamba-", sys_arch_str @@ -139,7 +138,7 @@ install_micromamba <- function(micromamba_version = "2.0.2-2", cli::cli_abort( message = c( `x` = "{.file {umamba_bin_path}} was not extracted succesfully.", - `!` = "This error can be caused by missing `bzip2` system library." + `!` = "This error may be caused by missing `bzip2` system library." ), class = "condathis_install_error_missing_bzip2" ) diff --git a/man/install_micromamba.Rd b/man/install_micromamba.Rd index 982b11a..5bb04af 100644 --- a/man/install_micromamba.Rd +++ b/man/install_micromamba.Rd @@ -13,7 +13,7 @@ install_micromamba( } \arguments{ \item{micromamba_version}{Character string specifying the version of Micromamba to download. -Defaults to \code{"2.0.2-1"}.} +Defaults to \code{"2.0.2-2"}.} \item{timeout_limit}{Numeric value specifying the timeout limit for downloading the Micromamba binaries, in seconds. Defaults to \code{3600} seconds (1 hour).}