Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

User package library gets masked by GHA #200

Closed
jeroen opened this issue Nov 4, 2023 · 3 comments
Closed

User package library gets masked by GHA #200

jeroen opened this issue Nov 4, 2023 · 3 comments
Labels
feature a feature request or enhancement question❓

Comments

@jeroen
Copy link
Member

jeroen commented Nov 4, 2023

rig defaults to create a user package library (faq 1).

This can be unfortunate on linux, because when GHA runs a workflow inside a the container, it mounts $HOME to the host machine, so packages that were pre-installed by rig under ~/R in the container image are actually not available.

Perhaps it should only use a user package library if user != "root" ?

@gaborcsardi
Copy link
Member

gaborcsardi commented Nov 4, 2023

Set R_LIBS_USER to point to some other path, within R_HOME, or somewhere else. You can include the R version in the path with %V, etc.

rig just uses R_LIBS_USER to decide where the user's library will be, so setting that before installing R should work well.

@gaborcsardi gaborcsardi added question❓ feature a feature request or enhancement labels Nov 5, 2023
@gaborcsardi
Copy link
Member

Maybe we can change the default, actually. We could omit the user library by default if the (original) user is root. We need to be careful, because people do

sudo rig add ...

in which case we need to look up the original user. But I guess we are already doing that, to create the user library at the right place.

@gaborcsardi
Copy link
Member

I decided not to change this now, since you could solve your original problem, and changing the installation location now could break people's workflows.

Please reopen or open a new issue if you have problems with this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement question❓
Projects
None yet
Development

No branches or pull requests

2 participants