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
rig fails with "No such file or directory" in user mode on macOS when ~/.local/bin does not exist #491
On macOS in user mode, when ~/.local/bin does not exist yet, most rig commands fail with a bare error:
$ rig list
✗ No such file or directory (os error 2)
$ rig add 4.6.1 --user
✗ No such file or directory (os error 2)
A fresh macOS user account has no ~/.local/bin, so this is the state of anyone who has not installed R with rig before (and has not had some other tool create that directory). Reproduced with rig 0.11.0 and with main (d8054fc):
H=$(mktemp -d)
HOME=$H RIG_MODE=user rig list # fails
mkdir -p $H/.local/bin
HOME=$H RIG_MODE=user rig list # works
Cause: find_aliases() in src/macos.rs calls std::fs::read_dir() on the binary directory without checking that it exists. sc_get_list_details() calls it for rig list, and rig add calls it through find_installed_version_arch() for the already-installed check, before anything has had a chance to create the directory (sc_set_default and sc_system_make_links create it, but they run later). The Linux and Windows versions of find_aliases() already return an empty list when the directory is missing, so this is macOS only.
Impact: RStudio now bundles rig and runs rig add <version> --user when a project asks for an R version that is not installed (rstudio/rstudio#19229). On a Mac without ~/.local/bin that install fails with the message above and nothing else to go on. Workaround until then: mkdir -p ~/.local/bin.
This is not #462, which is admin mode and rig library list, although the error text is the same.
Activity
create rig's quick-link directory before a user-mode install
gaborcsardi commentedon Oct 23, 2026
Normally rig is installed in
~/.local/bin, so this does not come up. But of course it can be installed elsewhere.keep a rig user-mode install from becoming the default R outside RStu…
undo rig's Windows default after a user-mode install as well (#19233)
github-actions commentedon Nov 7, 2026
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue