rig
rig copied to clipboard
User package library gets masked by GHA
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" ?
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.
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.
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!