mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Use shlex.split
This commit is contained in:
parent
b7bd825e15
commit
54d212f0d7
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import os
|
import os
|
||||||
|
import shlex
|
||||||
|
|
||||||
from pre_commit import five
|
from pre_commit import five
|
||||||
from pre_commit.languages import helpers
|
from pre_commit.languages import helpers
|
||||||
|
|
@ -82,7 +83,7 @@ def run_hook(repo_cmd_runner, hook, file_args):
|
||||||
# automated cleanup of docker images.
|
# automated cleanup of docker images.
|
||||||
build_docker_image(repo_cmd_runner, pull=False)
|
build_docker_image(repo_cmd_runner, pull=False)
|
||||||
|
|
||||||
entry_parts = hook['entry'].split(' ')
|
entry_parts = shlex.split(hook['entry'])
|
||||||
entry_executable, entry_args = entry_parts[0], entry_parts[1:]
|
entry_executable, entry_args = entry_parts[0], entry_parts[1:]
|
||||||
|
|
||||||
cmd = (
|
cmd = (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue