Skip to content

Commit

Permalink
Uses latest version of library if cluster is higher
Browse files Browse the repository at this point in the history
  • Loading branch information
edgararuiz committed Apr 24, 2024
1 parent 0df5541 commit 518d4e0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/python-use-envname.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ use_envname <- function(
if (!is.null(main_library) && !match_exact) {
lib_info <- python_library_info(main_library, fail = FALSE, verbose = FALSE)
latest_ver <- lib_info$version
install_recent <- compareVersion(latest_ver, version) == 1
vers <- compareVersion(latest_ver, version)
install_recent <- vers == 1
# 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
}
} else {
install_recent <- TRUE
}
Expand Down

0 comments on commit 518d4e0

Please sign in to comment.