Files
pre-commit/pre_commit/languages/system.py
Anthony Sottile fb0d67bd87 Some slight fixups
2015-11-19 12:46:02 -08:00

27 lines
613 B
Python

from __future__ import unicode_literals
import shlex
from pre_commit.languages.helpers import file_args_to_stdin
ENVIRONMENT_DIR = None
def install_environment(
repo_cmd_runner,
version='default',
additional_dependencies=None,
):
"""Installation for system type is a noop."""
raise AssertionError('Cannot install system repo.')
def run_hook(repo_cmd_runner, hook, file_args):
return repo_cmd_runner.run(
['xargs', '-0'] + shlex.split(hook['entry']) + hook['args'],
stdin=file_args_to_stdin(file_args),
retcode=None,
encoding=None,
)