Fix filenames with spaces in them.

This commit is contained in:
Anthony Sottile 2014-06-20 10:20:02 -07:00
parent 061ac81682
commit 2ec7a34035
8 changed files with 25 additions and 7 deletions

View file

@ -13,7 +13,7 @@ def install_environment(repo_cmd_runner, version='default'):
def run_hook(repo_cmd_runner, hook, file_args):
return repo_cmd_runner.run(
['xargs', '{{prefix}}{0}'.format(hook['entry'])] + hook['args'],
['xargs', '-0', '{{prefix}}{0}'.format(hook['entry'])] + hook['args'],
# TODO: this is duplicated in pre_commit/languages/helpers.py
stdin=file_args_to_stdin(file_args),
retcode=None,