-
Notifications
You must be signed in to change notification settings - Fork 232
Description
Describe the bug
Context: GitHub repo with an R package in a subdirectory with an associated renv environment, example: https://github.com/milanmlft/test-r-lib-actions
When setting working-directory for setup-r-dependencies@v2 to run the GHA workflow in the package subdirectory, I get the error
Error:
! error in pak subprocess
Caused by error in `loadNamespace(name)`:
! there is no package called ‘pak’
during Dependency resolution.
I think this is happening because pak gets installed before the renv environment in the subdirectory gets activated. Hence pak is not present in the renv library and so is not found.
To Reproduce
Full logs: https://github.com/milanmlft/test-r-lib-actions/actions/runs/6562363561/job/17824139556
Expected behavior
pak should be installed in the renv library of the subdirectory.