Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RScript location not always correct #2300

Closed
jeff-m-sullivan opened this issue Mar 23, 2022 · 2 comments
Closed

RScript location not always correct #2300

jeff-m-sullivan opened this issue Mar 23, 2022 · 2 comments
Labels

Comments

@jeff-m-sullivan
Copy link
Contributor

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:

return os.path.join(os.getenv('R_HOME', ''), 'Rscript')

Just adding bin to that path join should solve the issue.

@asottile
Copy link
Member

@lorenzwalthert ^

jeff-m-sullivan added a commit to jeff-m-sullivan/pre-commit that referenced this issue Mar 23, 2022
@asottile
Copy link
Member

asottile commented Apr 2, 2022

via #2301

@asottile asottile closed this as completed Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants