mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-16 05:53:30 -06:00
Added unit tests for dependencies
This commit is contained in:
@@ -47,11 +47,13 @@ def install_environment(
|
||||
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 {deps}".format(
|
||||
node_env.run(
|
||||
"cd '{prefix}' && npm install -g " +
|
||||
' '.join(
|
||||
[shell_escape(dep) for dep in additional_dependencies]
|
||||
[shell_escape(dep) for dep in
|
||||
additional_dependencies]
|
||||
)
|
||||
))
|
||||
)
|
||||
|
||||
|
||||
def run_hook(repo_cmd_runner, hook, file_args):
|
||||
|
||||
@@ -63,11 +63,12 @@ def install_environment(
|
||||
with in_env(repo_cmd_runner, version) as env:
|
||||
env.run("cd '{prefix}' && pip install .")
|
||||
if additional_dependencies:
|
||||
env.run("cd '{prefix}' && pip install {deps}".format(
|
||||
env.run(
|
||||
"cd '{prefix}' && pip install " +
|
||||
' '.join(
|
||||
shell_escape(dep) for dep in additional_dependencies
|
||||
)
|
||||
))
|
||||
)
|
||||
|
||||
|
||||
def run_hook(repo_cmd_runner, hook, file_args):
|
||||
|
||||
@@ -98,12 +98,12 @@ def install_environment(
|
||||
)
|
||||
if additional_dependencies:
|
||||
ruby_env.run(
|
||||
'cd {prefix} && gem install --no-document {deps}'.format(
|
||||
' '.join(
|
||||
shell_escape(dep) for dep in
|
||||
additional_dependencies
|
||||
)
|
||||
))
|
||||
'cd {prefix} && gem install --no-document ' +
|
||||
' '.join(
|
||||
shell_escape(dep) for dep in
|
||||
additional_dependencies
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def run_hook(repo_cmd_runner, hook, file_args):
|
||||
|
||||
Reference in New Issue
Block a user