mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
fix: ensure env patch is applied for vanilla emulation
otherwise, installing the hooks when RENV_USER env variable is set (e.g. in RStudio with renv project) will result in executing the installation script in the wrong renv
This commit is contained in:
parent
cd429db5e2
commit
c2c061cf63
2 changed files with 37 additions and 13 deletions
|
|
@ -286,7 +286,7 @@ def test_health_check_without_version(prefix, installed_environment, version):
|
|||
prefix, env_dir = installed_environment
|
||||
|
||||
# simulate old pre-commit install by unsetting the installed version
|
||||
r._execute_vanilla_r_code_as_script(
|
||||
r._execute_r_in_renv(
|
||||
f'renv::settings$r.version({version})',
|
||||
prefix=prefix, version=C.DEFAULT, cwd=env_dir,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue