mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-26 02:49:09 -06:00
Fix already using rbenv + default ruby. Resolves #369.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user