Make shlex behaviour of entry more consistent

This commit is contained in:
Anthony Sottile 2017-01-05 11:51:57 -08:00
parent 0de174f2ac
commit 6055af8bc8
7 changed files with 19 additions and 17 deletions

View file

@ -1,7 +1,6 @@
from __future__ import unicode_literals
import shlex
from pre_commit.languages import helpers
from pre_commit.xargs import xargs
@ -18,6 +17,4 @@ def install_environment(
def run_hook(repo_cmd_runner, hook, file_args):
return xargs(
tuple(shlex.split(hook['entry'])) + tuple(hook['args']), file_args,
)
return xargs(helpers.to_cmd(hook), file_args)