Skip to content

Commit

Permalink
Ensures the correct version is used in the prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
edgararuiz committed Apr 24, 2024
1 parent 53221bd commit 163c65a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/python-use-envname.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ use_envname <- function(

match_one <- length(envs) > 0
match_exact <- length(envs[envs == envname]) > 0
install_ver <- version

if (!is.null(main_library) && !match_exact) {
lib_info <- python_library_info(main_library, fail = FALSE, verbose = FALSE)
Expand All @@ -43,7 +44,7 @@ use_envname <- function(
# For cases when the cluster's version is higher than the latest library
if(vers == -1) {
envname <- as.character(glue("{env_base}{latest_ver}"))
version <- latest_ver
install_ver <- latest_ver
}
} else {
install_recent <- TRUE
Expand Down Expand Up @@ -101,7 +102,7 @@ use_envname <- function(
cli_alert_warning(msg_1)
cli_bullets(c(
" " = msg_2,
" " = "{.header Do you wish to install {con_label} version {version}?}"
" " = "{.header Do you wish to install {con_label} version {install_ver}?}"
))
choice <- menu(choices = c(
paste0("Yes", msg_yes),
Expand Down

0 comments on commit 163c65a

Please sign in to comment.