Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3584b99

Browse files
committed
simplify docker run
1 parent 11568ca commit 3584b99

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

pre_commit/languages/docker.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ def run_hook(
8787
# automated cleanup of docker images.
8888
build_docker_image(hook.prefix, pull=False)
8989

90-
hook_cmd = hook.cmd
91-
entry_exe, cmd_rest = hook.cmd[0], hook_cmd[1:]
90+
entry_exe, *cmd_rest = hook.cmd
9291

9392
entry_tag = ('--entrypoint', entry_exe, docker_tag(hook.prefix))
94-
cmd = docker_cmd() + entry_tag + cmd_rest
93+
cmd = (*docker_cmd(), *entry_tag, *cmd_rest)
9594
return helpers.run_xargs(hook, cmd, file_args, color=color)

0 commit comments

Comments
 (0)