mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 17:14:43 +04:00
shlex-quote install path to fix windows
This commit is contained in:
parent
04471f7d97
commit
44f5753bd8
1 changed files with 4 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
import contextlib
|
import contextlib
|
||||||
import os
|
import os
|
||||||
|
import shlex
|
||||||
from typing import Generator
|
from typing import Generator
|
||||||
from typing import Sequence
|
from typing import Sequence
|
||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
|
|
@ -26,11 +27,11 @@ def get_env_patch(venv: str) -> PatchesT:
|
||||||
return (
|
return (
|
||||||
('PATH', (os.path.join(venv, 'bin'), os.pathsep, Var('PATH'))),
|
('PATH', (os.path.join(venv, 'bin'), os.pathsep, Var('PATH'))),
|
||||||
('PERL5LIB', os.path.join(venv, 'lib', 'perl5')),
|
('PERL5LIB', os.path.join(venv, 'lib', 'perl5')),
|
||||||
('PERL_MB_OPT', f'--install_base {venv}'),
|
('PERL_MB_OPT', f'--install_base {shlex.quote(venv)}'),
|
||||||
(
|
(
|
||||||
'PERL_MM_OPT', (
|
'PERL_MM_OPT', (
|
||||||
f'INSTALL_BASE={venv}'
|
f'INSTALL_BASE={shlex.quote(venv)} '
|
||||||
' INSTALLSITEMAN1DIR=none INSTALLSITEMAN3DIR=none'
|
f'INSTALLSITEMAN1DIR=none INSTALLSITEMAN3DIR=none'
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue