mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-14 21:10:27 -06:00
use Rscript path relative to $R_HOME/bin/...
Co-authored-by: Lorenz Walthert <lorenz.walthert@icloud.com>
This commit is contained in:
committed by
Anthony Sottile
parent
934afb85a4
commit
764a0db68e
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user