mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Merge pull request #2301 from jeff-m-sullivan/rscript-path
use Rscript path relative to $R_HOME/bin/...
This commit is contained in:
commit
e11163d010
2 changed files with 17 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue