mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Fix already using rbenv + default ruby. Resolves #369.
This commit is contained in:
parent
749b840695
commit
e77bb8f3c3
1 changed files with 4 additions and 2 deletions
|
|
@ -19,16 +19,18 @@ ENVIRONMENT_DIR = 'rbenv'
|
|||
|
||||
|
||||
def get_env_patch(venv, language_version):
|
||||
return (
|
||||
patches = (
|
||||
('GEM_HOME', os.path.join(venv, 'gems')),
|
||||
('RBENV_ROOT', venv),
|
||||
('RBENV_VERSION', language_version),
|
||||
('PATH', (
|
||||
os.path.join(venv, 'gems', 'bin'), os.pathsep,
|
||||
os.path.join(venv, 'shims'), os.pathsep,
|
||||
os.path.join(venv, 'bin'), os.pathsep, Var('PATH'),
|
||||
)),
|
||||
)
|
||||
if language_version != 'default':
|
||||
patches += (('RBENV_VERSION', language_version),)
|
||||
return patches
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue