mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Use pipes.quote for executable path
This commit is contained in:
parent
6b81fe9d58
commit
873dd173ce
3 changed files with 6 additions and 4 deletions
|
|
@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
|||
|
||||
import io
|
||||
import os.path
|
||||
import pipes
|
||||
import sys
|
||||
|
||||
from pre_commit import output
|
||||
|
|
@ -68,7 +69,7 @@ def install(
|
|||
|
||||
skip_on_missing_conf = 'true' if skip_on_missing_conf else 'false'
|
||||
contents = io.open(resource_filename('hook-tmpl')).read().format(
|
||||
sys_executable=sys.executable,
|
||||
sys_executable=pipes.quote(sys.executable),
|
||||
hook_type=hook_type,
|
||||
hook_specific=hook_specific_contents,
|
||||
config_file=runner.config_file,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue