Skip to content

Install R before rig proj sync in configure-test-env - #15319

Merged
cderv merged 1 commit into
mainfrom
fix/configure-test-env-install-r-first
Nov 10, 2026
Merged

cderv merged 1 commit into
mainfrom
fix/configure-test-env-install-r-first

Conversation

@cderv

@cderv cderv commented Nov 9, 2026

Copy link
Copy Markdown
Member

Follow-up to #15308. On a machine without the locked R, configure-test-env ran a plain rig 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 under tests/.rvenv ended 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 run rig proj sync --no-install-r as 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):

  • referenced the GitHub issue this PR closes
  • updated the appropriate changelog in the PR
  • ensured the present test suite passes
  • added new tests
  • created a separate documentation PR in Quarto's website repo and linked it to this PR
AI-assisted PR
  • AI tool used: Claude Code
  • Codebase grounding: local clone
  • Human review: I have reviewed, tested, and verified the AI-generated content before submitting.

Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.

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.
@posit-snyk-bot

posit-snyk-bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv
cderv merged commit 9777eda into main Nov 10, 2026
52 checks passed
@cderv
cderv deleted the fix/configure-test-env-install-r-first branch November 10, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants