mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-13 20:40:08 -06:00
Add pcre type.
This commit is contained in:
@@ -1,16 +1,20 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from pre_commit.languages.helpers import file_args_to_stdin
|
||||
|
||||
|
||||
ENVIRONMENT_DIR = None
|
||||
|
||||
|
||||
def install_environment(repo_cmd_runner, version='default'):
|
||||
"""Installation for script type is a noop."""
|
||||
raise AssertionError('Cannot install script repo.')
|
||||
|
||||
|
||||
def run_hook(repo_cmd_runner, hook, file_args):
|
||||
return repo_cmd_runner.run(
|
||||
['xargs', '{{prefix}}{0}'.format(hook['entry'])] + hook['args'],
|
||||
# TODO: this is duplicated in pre_commit/languages/helpers.py
|
||||
stdin='\n'.join(list(file_args) + ['']),
|
||||
stdin=file_args_to_stdin(file_args),
|
||||
retcode=None,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user