mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-14 04:50:20 -06:00
Use shlex.split
This commit is contained in:
@@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
||||
|
||||
import hashlib
|
||||
import os
|
||||
import shlex
|
||||
|
||||
from pre_commit import five
|
||||
from pre_commit.languages import helpers
|
||||
@@ -82,7 +83,7 @@ def run_hook(repo_cmd_runner, hook, file_args):
|
||||
# automated cleanup of docker images.
|
||||
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:]
|
||||
|
||||
cmd = (
|
||||
|
||||
Reference in New Issue
Block a user