mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +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
|
|
@ -4,6 +4,7 @@ from __future__ import unicode_literals
|
|||
|
||||
import io
|
||||
import os.path
|
||||
import pipes
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
|
|
@ -54,7 +55,7 @@ def test_install_pre_commit(tempdir_factory):
|
|||
pre_commit_contents = io.open(runner.pre_commit_path).read()
|
||||
pre_commit_script = resource_filename('hook-tmpl')
|
||||
expected_contents = io.open(pre_commit_script).read().format(
|
||||
sys_executable=sys.executable,
|
||||
sys_executable=pipes.quote(sys.executable),
|
||||
hook_type='pre-commit',
|
||||
hook_specific='',
|
||||
config_file=runner.config_file,
|
||||
|
|
@ -70,7 +71,7 @@ def test_install_pre_commit(tempdir_factory):
|
|||
pre_push_tmpl = resource_filename('pre-push-tmpl')
|
||||
pre_push_template_contents = io.open(pre_push_tmpl).read()
|
||||
expected_contents = io.open(pre_commit_script).read().format(
|
||||
sys_executable=sys.executable,
|
||||
sys_executable=pipes.quote(sys.executable),
|
||||
hook_type='pre-push',
|
||||
hook_specific=pre_push_template_contents,
|
||||
config_file=runner.config_file,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue