mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 00:54:42 +04:00
unset renv project
This commit is contained in:
parent
ba496b8369
commit
b7331b653a
1 changed files with 6 additions and 3 deletions
|
|
@ -8,6 +8,7 @@ from typing import Tuple
|
||||||
|
|
||||||
from pre_commit.envcontext import envcontext
|
from pre_commit.envcontext import envcontext
|
||||||
from pre_commit.envcontext import PatchesT
|
from pre_commit.envcontext import PatchesT
|
||||||
|
from pre_commit.envcontext import UNSET
|
||||||
from pre_commit.hook import Hook
|
from pre_commit.hook import Hook
|
||||||
from pre_commit.languages import helpers
|
from pre_commit.languages import helpers
|
||||||
from pre_commit.prefix import Prefix
|
from pre_commit.prefix import Prefix
|
||||||
|
|
@ -23,6 +24,7 @@ healthy = helpers.basic_healthy
|
||||||
def get_env_patch(venv: str) -> PatchesT:
|
def get_env_patch(venv: str) -> PatchesT:
|
||||||
return (
|
return (
|
||||||
('R_PROFILE_USER', os.path.join(venv, 'activate.R')),
|
('R_PROFILE_USER', os.path.join(venv, 'activate.R')),
|
||||||
|
('RENV_PROJECT', UNSET),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -54,11 +56,12 @@ def _prefix_if_non_local_file_entry(
|
||||||
path = prefix.path(entry[1])
|
path = prefix.path(entry[1])
|
||||||
return (path,)
|
return (path,)
|
||||||
|
|
||||||
def _rscript_exec():
|
|
||||||
|
def _rscript_exec() -> str:
|
||||||
"""
|
"""
|
||||||
When invoked in a sub-process of R, use full path
|
When invoked in a sub-process of R, use full path
|
||||||
"""
|
"""
|
||||||
return os.path.join(os.getenv('R_HOME', ""), 'Rscript')
|
return os.path.join(os.getenv('R_HOME', ''), 'Rscript')
|
||||||
|
|
||||||
|
|
||||||
def _entry_validate(entry: Sequence[str]) -> None:
|
def _entry_validate(entry: Sequence[str]) -> None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue