mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04: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
|
|
@ -5,6 +5,7 @@ import sys
|
|||
|
||||
from pre_commit.languages import helpers
|
||||
from pre_commit.util import clean_path_on_failure
|
||||
from pre_commit.util import shell_escape
|
||||
|
||||
|
||||
ENVIRONMENT_DIR = 'node_env'
|
||||
|
|
@ -44,8 +45,11 @@ def install_environment(repo_cmd_runner,
|
|||
with in_env(repo_cmd_runner, version) as node_env:
|
||||
node_env.run("cd '{prefix}' && npm install -g")
|
||||
if additional_dependencies:
|
||||
node_env.run("cd '{prefix}' && npm install -g " +
|
||||
' '.join(additional_dependencies))
|
||||
node_env.run("cd '{prefix}' && npm install -g {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