use Rscript path relative to $R_HOME/bin/...

Co-authored-by: Lorenz Walthert <lorenz.walthert@icloud.com>
This commit is contained in:
Jeff Sullivan
2022-03-22 21:52:46 -04:00
committed by Anthony Sottile
parent 934afb85a4
commit 764a0db68e
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: