mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-24 17:59:23 -06:00
Pass language_version to the install method for each language.
This commit is contained in:
@@ -24,7 +24,7 @@ def in_env(repo_cmd_runner):
|
||||
yield NodeEnv(repo_cmd_runner)
|
||||
|
||||
|
||||
def install_environment(repo_cmd_runner):
|
||||
def install_environment(repo_cmd_runner, version='default'):
|
||||
assert repo_cmd_runner.exists('package.json')
|
||||
|
||||
with clean_path_on_failure(repo_cmd_runner.path(python.ENVIRONMENT_DIR)):
|
||||
|
||||
@@ -18,7 +18,7 @@ def in_env(repo_cmd_runner):
|
||||
yield PythonEnv(repo_cmd_runner)
|
||||
|
||||
|
||||
def install_environment(repo_cmd_runner):
|
||||
def install_environment(repo_cmd_runner, version='default'):
|
||||
assert repo_cmd_runner.exists('setup.py')
|
||||
|
||||
# Install a virtualenv
|
||||
|
||||
@@ -56,7 +56,7 @@ def _install_rbenv(repo_cmd_runner):
|
||||
)
|
||||
|
||||
|
||||
def install_environment(repo_cmd_runner):
|
||||
def install_environment(repo_cmd_runner, version='default'):
|
||||
with clean_path_on_failure(repo_cmd_runner.path('rbenv')):
|
||||
_install_rbenv(repo_cmd_runner)
|
||||
with in_env(repo_cmd_runner) as ruby_env:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
ENVIRONMENT_DIR = None
|
||||
|
||||
|
||||
def install_environment(repo_cmd_runner):
|
||||
def install_environment(repo_cmd_runner, version='default'):
|
||||
"""Installation for script type is a noop."""
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import shlex
|
||||
ENVIRONMENT_DIR = None
|
||||
|
||||
|
||||
def install_environment(repo_cmd_runner):
|
||||
def install_environment(repo_cmd_runner, version='default'):
|
||||
"""Installation for system type is a noop."""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user