mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-27 03:18:39 -06:00
Allow spaces in system hooks. Closes #95.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import shlex
|
||||
|
||||
|
||||
ENVIRONMENT_DIR = None
|
||||
|
||||
|
||||
@@ -7,7 +10,7 @@ def install_environment(repo_cmd_runner):
|
||||
|
||||
def run_hook(repo_cmd_runner, hook, file_args):
|
||||
return repo_cmd_runner.run(
|
||||
['xargs', hook['entry']] + hook['args'],
|
||||
['xargs'] + shlex.split(hook['entry']) + hook['args'],
|
||||
# TODO: this is duplicated in pre_commit/languages/helpers.py
|
||||
stdin='\n'.join(list(file_args) + ['']),
|
||||
retcode=None,
|
||||
|
||||
Reference in New Issue
Block a user