Repository navigation
Commit 07b3cb1
committed
Default rig to user mode in configure-test-env.ps1 (#15327)
rig defaults to admin mode, where installing R elevates and raises a UAC prompt on every setup run on Windows. User mode installs R in the user profile without elevation, which is also what the rig maintainer recommends for `rig proj` (r-lib/rig#503).
The script sets RIG_MODE=user only when it is unset, so an explicit RIG_MODE or a rig config still wins, and removes it again at the end so dot-sourcing the script does not change the caller's shell. The selected R is recorded as an absolute path in `.rvenv/rvenv.cfg`, so the tests do not need the variable.
Only the PowerShell script changes. On Linux, user mode installs portable R builds that rig documents as less tested than the distro builds.
Checked on Windows: with RIG_MODE unset the script selects R 4.6.2 under %APPDATA%\rig\data\r, syncs the lock and installs dev knitr and rmarkdown, and leaves RIG_MODE unset in the calling shell. A knitr smoke-all document passes with and without RIG_MODE=user.
(cherry picked from commit 1ad9b3d)1 parent a7198d0 commit 07b3cb1
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
| |||
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
| 41 | + | |
34 | 42 | | |
35 | 43 | | |
36 | 44 | | |
| |||
0 commit comments