mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Make shlex behaviour of entry more consistent
This commit is contained in:
parent
0de174f2ac
commit
6055af8bc8
7 changed files with 19 additions and 17 deletions
|
|
@ -1,5 +1,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import shlex
|
||||
|
||||
from pre_commit.util import cmd_output
|
||||
|
||||
|
||||
|
|
@ -12,3 +14,7 @@ def environment_dir(ENVIRONMENT_DIR, language_version):
|
|||
return None
|
||||
else:
|
||||
return '{}-{}'.format(ENVIRONMENT_DIR, language_version)
|
||||
|
||||
|
||||
def to_cmd(hook):
|
||||
return tuple(shlex.split(hook['entry'])) + tuple(hook['args'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue