You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Install and Switch to R fails on Windows when the destination isn't the folder rig's links point into #19561
Follow-up to #19468 / #19476, which fixed the case where R is installed into the folder rig's existing links already point into.
Problem
On Windows, "Install and Switch to R" still fails when the chosen destination is not the folder rig's R-release.exe / R-oldrel.exe / R-next.exe links (in %USERPROFILE%\.local\bin) point into. The job stops with:
Cannot extract R version from C:\Users\<user>\.local\bin\R-release.exe, invalid R link file?
and nothing is installed.
Steps to reproduce
On Windows, have an R installed by rig in user mode in its default folder (%APPDATA%\rig\data\r), so that R-release.exe exists in %USERPROFILE%\.local\bin.
In RStudio, start "Install and Switch to R" for a version that isn't installed, and change the destination in the dialog to another folder (say D:\R).
The same happens when the default folder is reached through a junction or symlink: RStudio resolves it with normalizePath(), so the path rig is given differs from the one it wrote into the link.
Cause
This is in rig 0.11.0, the version RStudio bundles. Before downloading, rig add --user lists the installed versions, and on Windows find_aliases() fails the whole command when any alias link's target isn't under RIG_R_INSTALL_DIR (mod.rs#L1348-L1371); macOS and Linux skip such a link.
Reported upstream as r-lib/rig#506 and fixed by r-lib/rig#507 (merged 2026-11-07), which skips links outside the current root. The fix is not in a release yet: v0.11.1 predates it.
Proposed fix
Update the bundled rig (dependencies/common/rig.cmake, and the pinned version in SessionRig.R) to the first release that includes r-lib/rig#507, then check the two cases above on Windows.
rig v0.11.1 predates r-lib/rig#507, so there's no release to bump to yet; this is blocked on the next rig release. Note that a Windows rig add into another root also deletes the quick links of the default root's R versions in make-links, which r-lib/rig#507 doesn't change.
Activity
kevinushey commentedon Nov 16, 2026
rig v0.11.1 predates r-lib/rig#507, so there's no release to bump to yet; this is blocked on the next rig release. Note that a Windows
rig addinto another root also deletes the quick links of the default root's R versions inmake-links, which r-lib/rig#507 doesn't change.