Merge pull request #2301 from jeff-m-sullivan/rscript-path

use Rscript path relative to $R_HOME/bin/...
This commit is contained in:
Anthony Sottile 2022-04-02 15:30:52 -04:00 committed by GitHub
commit e11163d010
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View file

@ -59,7 +59,11 @@ def _prefix_if_non_local_file_entry(
def _rscript_exec() -> str:
return os.path.join(os.getenv('R_HOME', ''), 'Rscript')
r_home = os.environ.get('R_HOME')
if r_home is None:
return 'Rscript'
else:
return os.path.join(r_home, 'bin', 'Rscript')
def _entry_validate(entry: Sequence[str]) -> None: