Repository navigation
Install R before rig proj sync in configure-test-env - #15319
Merged
Merged
Conversation
In rig's admin mode, rig proj sync installs a missing R by re-running the whole command elevated, so the project library under tests/.rvenv ends up owned by root (r-lib/rig#503, fixed in rig's development version but not in 0.11.1). Setting up the test environment on a machine without the locked R then leaves a library the later dev rmarkdown and knitr installs cannot write to, and they fall back to the locked versions. Install R with rig add first, which does nothing when that version is already installed, then run rig proj sync --no-install-r as the calling user. This is the sequence the CI workflow already uses. Both configure-test-env.sh and configure-test-env.ps1 get it, since rig elevates the same way on Windows. Verified the already-installed path on Windows with both scripts. The missing-R path was not exercised.
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #15308. On a machine without the locked R,
configure-test-envran a plainrig proj sync. In rig's admin mode that installs R by re-running the whole command under sudo (r-lib/rig#503, fixed in rig's development version but not in 0.11.1). The project library undertests/.rvenvended up owned by root, the dev rmarkdown and knitr installs that follow could not write to it, and the tests silently used the locked versions instead.Both scripts now install R first with
rig add, which does nothing when that version is already installed, then runrig proj sync --no-install-ras the calling user. This is the same sequence the CI workflow already uses. The PowerShell script gets it too, since rig elevates the same way on Windows.The path where R is already installed was run on Windows with both scripts. The path where R is missing was not exercised.
Checklist
I have (if applicable):
AI-assisted PR
Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.