-
-
Notifications
You must be signed in to change notification settings - Fork 931
Closed
Description
This rarely comes up, because most people (in my experience) don't explicitly set R_HOME in regular terminals, but do have RScript in the path. If you use the RStudio-supplied Terminal, however, they do explicitly set R_HOME, which then causes the hook installs to break on some platforms (e.g., AWS Ubuntu is where I encountered the problem).
While some distributions add symlinks, the default install location for RScript is $R_HOME/bin/Rscript:
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installation
I believe it can be fixed in just one spot:
pre-commit/pre_commit/languages/r.py
Line 62 in 354b900
| return os.path.join(os.getenv('R_HOME', ''), 'Rscript') |
Just adding bin to that path join should solve the issue.
Reactions are currently unavailable