mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Change python hook to stay in cwd on deps installation
This commit is contained in:
parent
837d6172bb
commit
e77f4469b5
1 changed files with 4 additions and 1 deletions
|
|
@ -207,8 +207,11 @@ def install_environment(
|
||||||
python = norm_version(version)
|
python = norm_version(version)
|
||||||
if python is not None:
|
if python is not None:
|
||||||
venv_cmd.extend(('-p', python))
|
venv_cmd.extend(('-p', python))
|
||||||
install_cmd = ('python', '-mpip', 'install', '.', *additional_dependencies)
|
install_cmd = ('python', '-mpip', 'install', '.')
|
||||||
|
|
||||||
cmd_output_b(*venv_cmd, cwd='/')
|
cmd_output_b(*venv_cmd, cwd='/')
|
||||||
with in_env(prefix, version):
|
with in_env(prefix, version):
|
||||||
lang_base.setup_cmd(prefix, install_cmd)
|
lang_base.setup_cmd(prefix, install_cmd)
|
||||||
|
|
||||||
|
if additional_dependencies:
|
||||||
|
cmd_output_b(*install_cmd[:-1], *additional_dependencies)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue