mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-27 02:20:48 -05:00
Add pcre type.
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
def file_args_to_stdin(file_args):
|
||||
return '\n'.join(list(file_args) + [''])
|
||||
|
||||
|
||||
def run_hook(env, hook, file_args):
|
||||
return env.run(
|
||||
' '.join(['xargs', hook['entry']] + hook['args']),
|
||||
stdin='\n'.join(list(file_args) + ['']),
|
||||
stdin=file_args_to_stdin(file_args),
|
||||
retcode=None,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user