Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Splitting pattern for RENV_CONFIG_EXTERNAL_LIBRARIES does not work well on Windows. #2069

Closed
MilesMcBain opened this issue Jan 7, 2025 · 2 comments

Comments

@MilesMcBain
Copy link

When using env var RENV_CONFIG_EXTERNAL_LIBRARIES the code here:

https://github.com/rstudio/renv/blob/281ddcb90b2f742ac9e6e15682f44a9ad9858dd8/R/config.R#L137C5-L137C20

selects string splitting pattern "\\s*[:;,]\\s*" which splits a Windows path like C:/Users/username/r_library/ into two pieces due to the comma. It seems that I get lucky and that /Users/username/r_library/ is defaulted to C: drive somewhere along the way. But as an unfortunate side effect a new empty folder called "C" (corresponding to the first split) is created in my project root.

@MilesMcBain MilesMcBain changed the title Splitting pattern in for RENV_CONFIG_EXTERNAL_LIBRARIES does work well on Windows. Splitting pattern in for RENV_CONFIG_EXTERNAL_LIBRARIES does not work well on Windows. Jan 7, 2025
@MilesMcBain MilesMcBain changed the title Splitting pattern in for RENV_CONFIG_EXTERNAL_LIBRARIES does not work well on Windows. Splitting pattern for RENV_CONFIG_EXTERNAL_LIBRARIES does not work well on Windows. Jan 7, 2025
@kevinushey
Copy link
Collaborator

Thanks for the bug report -- I'll take a look.

@kevinushey
Copy link
Collaborator

I pushed a potential bandaid for this in d6fe08d -- are you able to confirm if that fixes the issue on your side as well?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants