Skip to content

RScript location not always correct #2300

@jeff-m-sullivan

Description

@jeff-m-sullivan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions