mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Implement default_language_version
This commit is contained in:
parent
579b05e424
commit
d3b5a41830
23 changed files with 150 additions and 103 deletions
|
|
@ -4,6 +4,7 @@ import contextlib
|
|||
import os
|
||||
import sys
|
||||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit.envcontext import envcontext
|
||||
from pre_commit.envcontext import Var
|
||||
from pre_commit.languages import helpers
|
||||
|
|
@ -57,7 +58,7 @@ def install_environment(prefix, version, additional_dependencies):
|
|||
cmd = [
|
||||
sys.executable, '-mnodeenv', '--prebuilt', '--clean-src', envdir,
|
||||
]
|
||||
if version != 'default':
|
||||
if version != C.DEFAULT:
|
||||
cmd.extend(['-n', version])
|
||||
cmd_output(*cmd)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue