mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Merge pull request #370 from pre-commit/fix_already_using_rbenv_default_ruby_version
Fix already using rbenv + default ruby. Resolves #369.
This commit is contained in:
commit
99df3cb602
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