mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
Merge pull request #2905 from jaysoffian/fix-gem-install
Force gem installation into envdir
This commit is contained in:
commit
e891f8606e
1 changed files with 4 additions and 0 deletions
|
|
@ -114,6 +114,8 @@ def _install_ruby(
|
|||
def install_environment(
|
||||
prefix: Prefix, version: str, additional_dependencies: Sequence[str],
|
||||
) -> None:
|
||||
envdir = lang_base.environment_dir(prefix, ENVIRONMENT_DIR, version)
|
||||
|
||||
if version != 'system': # pragma: win32 no cover
|
||||
_install_rbenv(prefix, version)
|
||||
with in_env(prefix, version):
|
||||
|
|
@ -135,6 +137,8 @@ def install_environment(
|
|||
'gem', 'install',
|
||||
'--no-document', '--no-format-executable',
|
||||
'--no-user-install',
|
||||
'--install-dir', os.path.join(envdir, 'gems'),
|
||||
'--bindir', os.path.join(envdir, 'gems', 'bin'),
|
||||
*prefix.star('.gem'), *additional_dependencies,
|
||||
),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue