mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Added shell_escape to shell escape dependencies
This commit is contained in:
parent
3726f07a3f
commit
d6be9cdf7c
3 changed files with 19 additions and 7 deletions
|
|
@ -9,6 +9,7 @@ import virtualenv
|
|||
|
||||
from pre_commit.languages import helpers
|
||||
from pre_commit.util import clean_path_on_failure
|
||||
from pre_commit.util import shell_escape
|
||||
|
||||
|
||||
ENVIRONMENT_DIR = 'py_env'
|
||||
|
|
@ -60,8 +61,11 @@ def install_environment(repo_cmd_runner,
|
|||
with in_env(repo_cmd_runner, version) as env:
|
||||
env.run("cd '{prefix}' && pip install .")
|
||||
if additional_dependencies:
|
||||
env.run("cd '{prefix}' && pip install " +
|
||||
(' ').join(additional_dependencies))
|
||||
env.run("cd '{prefix}' && pip install {deps}".format(
|
||||
' '.join(
|
||||
shell_escape(dep) for dep in additional_dependencies
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
def run_hook(repo_cmd_runner, hook, file_args):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue