Skip to content

Commit

Permalink
Merge pull request #1759 from rstudio/fix-ld-path-setting-on-linux
Browse files Browse the repository at this point in the history
Resolve `oldlibpath` even if nothing to set.
  • Loading branch information
t-kalinowski authored Mar 4, 2025
2 parents 2c5cdcc + 49e8516 commit 6143cb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

- Internal fixes to prevent reticulate-managed `uv` from writing outside
reticulates cache directory (#1745).

- Fixed an issue with pointing reticulate at a pyenv shim python (#1758)

# reticulate 1.41.0

Expand Down
2 changes: 1 addition & 1 deletion R/config.R
Original file line number Diff line number Diff line change
Expand Up @@ -774,8 +774,8 @@ prefix_python_lib_to_ld_library_path <- function(python) {
python <- c(python, normalizePath(python, mustWork = FALSE))
libpath <- file.path(dirname(dirname(python)), "lib")
libpath <- libpath[file.exists(libpath)]
oldlibpath <- Sys.getenv("LD_LIBRARY_PATH", unset = NA)
if (length(libpath)) {
oldlibpath <- Sys.getenv("LD_LIBRARY_PATH", unset = NA)
newlibpath <- paste0(c(libpath, oldlibpath), collapse = ":")
Sys.setenv(LD_LIBRARY_PATH = newlibpath)
}
Expand Down

0 comments on commit 6143cb6

Please sign in to comment.