mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-15 05:20:20 -06:00
simplify docker run
This commit is contained in:
@@ -87,9 +87,8 @@ def run_hook(
|
||||
# automated cleanup of docker images.
|
||||
build_docker_image(hook.prefix, pull=False)
|
||||
|
||||
hook_cmd = hook.cmd
|
||||
entry_exe, cmd_rest = hook.cmd[0], hook_cmd[1:]
|
||||
entry_exe, *cmd_rest = hook.cmd
|
||||
|
||||
entry_tag = ('--entrypoint', entry_exe, docker_tag(hook.prefix))
|
||||
cmd = docker_cmd() + entry_tag + cmd_rest
|
||||
cmd = (*docker_cmd(), *entry_tag, *cmd_rest)
|
||||
return helpers.run_xargs(hook, cmd, file_args, color=color)
|
||||
|
||||
Reference in New Issue
Block a user