mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
Implement a simplified xargs in python
This commit is contained in:
parent
a5b56bd9e3
commit
b7d395410b
13 changed files with 130 additions and 62 deletions
|
|
@ -12,6 +12,7 @@ from pre_commit.util import CalledProcessError
|
|||
from pre_commit.util import clean_path_on_failure
|
||||
from pre_commit.util import resource_filename
|
||||
from pre_commit.util import tarfile_open
|
||||
from pre_commit.xargs import xargs
|
||||
|
||||
|
||||
ENVIRONMENT_DIR = 'rbenv'
|
||||
|
|
@ -125,6 +126,4 @@ def install_environment(
|
|||
|
||||
def run_hook(repo_cmd_runner, hook, file_args):
|
||||
with in_env(repo_cmd_runner, hook['language_version']):
|
||||
return helpers.run_hook(
|
||||
(hook['entry'],) + tuple(hook['args']), file_args,
|
||||
)
|
||||
return xargs((hook['entry'],) + tuple(hook['args']), file_args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue