Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 44f5753

Browse files
committed
shlex-quote install path to fix windows
1 parent 04471f7 commit 44f5753

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

pre_commit/languages/perl.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import contextlib
22
import os
3+
import shlex
34
from typing import Generator
45
from typing import Sequence
56
from typing import Tuple
@@ -26,11 +27,11 @@ def get_env_patch(venv: str) -> PatchesT:
2627
return (
2728
('PATH', (os.path.join(venv, 'bin'), os.pathsep, Var('PATH'))),
2829
('PERL5LIB', os.path.join(venv, 'lib', 'perl5')),
29-
('PERL_MB_OPT', f'--install_base {venv}'),
30+
('PERL_MB_OPT', f'--install_base {shlex.quote(venv)}'),
3031
(
3132
'PERL_MM_OPT', (
32-
f'INSTALL_BASE={venv}'
33-
' INSTALLSITEMAN1DIR=none INSTALLSITEMAN3DIR=none'
33+
f'INSTALL_BASE={shlex.quote(venv)} '
34+
f'INSTALLSITEMAN1DIR=none INSTALLSITEMAN3DIR=none'
3435
),
3536
),
3637
)

0 commit comments

Comments
 (0)