-
Notifications
You must be signed in to change notification settings - Fork 233
setup-r-dependencies with working-directory fails when renv is present #768
Copy link
Copy link
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior