summaryrefslogtreecommitdiffstats
path: root/pre_commit/languages/docker.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-11-03 06:17:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2020-11-03 06:17:33 +0000
commit22b6d3abcec9046e294d08c741aa7b6338984e84 (patch)
treea0a9c823a7d82771ffb8a8b39f7143d5ba2f6b30 /pre_commit/languages/docker.py
parentAdding upstream version 2.7.1. (diff)
downloadpre-commit-22b6d3abcec9046e294d08c741aa7b6338984e84.tar.xz
pre-commit-22b6d3abcec9046e294d08c741aa7b6338984e84.zip
Adding upstream version 2.8.2.upstream/2.8.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/languages/docker.py')
-rw-r--r--pre_commit/languages/docker.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/pre_commit/languages/docker.py b/pre_commit/languages/docker.py
index 9c13119..9d30568 100644
--- a/pre_commit/languages/docker.py
+++ b/pre_commit/languages/docker.py
@@ -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)