mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14: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
|
|
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
|||
|
||||
import shlex
|
||||
|
||||
from pre_commit.languages import helpers
|
||||
from pre_commit.xargs import xargs
|
||||
|
||||
|
||||
ENVIRONMENT_DIR = None
|
||||
|
|
@ -18,6 +18,6 @@ def install_environment(
|
|||
|
||||
|
||||
def run_hook(repo_cmd_runner, hook, file_args):
|
||||
return helpers.run_hook(
|
||||
return xargs(
|
||||
tuple(shlex.split(hook['entry'])) + tuple(hook['args']), file_args,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue