mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-13 20:40:08 -06:00
Make shlex behaviour of entry more consistent
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from pre_commit.languages import helpers
|
||||
from pre_commit.xargs import xargs
|
||||
|
||||
|
||||
@@ -16,7 +17,6 @@ def install_environment(
|
||||
|
||||
|
||||
def run_hook(repo_cmd_runner, hook, file_args):
|
||||
return xargs(
|
||||
(repo_cmd_runner.prefix_dir + hook['entry'],) + tuple(hook['args']),
|
||||
file_args,
|
||||
)
|
||||
cmd = helpers.to_cmd(hook)
|
||||
cmd = (repo_cmd_runner.prefix_dir + cmd[0],) + cmd[1:]
|
||||
return xargs(cmd, file_args)
|
||||
|
||||
Reference in New Issue
Block a user