Implement no-dependency system and script hook types. Closes #39.

This commit is contained in:
Anthony Sottile 2014-03-30 15:15:13 -07:00
parent 02660f7c0a
commit c418f2b94e
14 changed files with 86 additions and 52 deletions

View file

@ -0,0 +1,13 @@
def install_environment(repo_cmd_runner):
"""Installation for system type is a noop."""
pass
def run_hook(repo_cmd_runner, hook, file_args):
return repo_cmd_runner.run(
['xargs', hook['entry']] + hook.get('args', []),
# TODO: this is duplicated in pre_commit/languages/helpers.py
stdin='\n'.join(list(file_args) + ['']),
retcode=None,
)