mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Added path function to PrefixedCommandRunner
This commit is contained in:
parent
bd6e62e28d
commit
6f0d566199
4 changed files with 44 additions and 12 deletions
|
|
@ -5,6 +5,7 @@ import os.path
|
|||
import pre_commit.constants as C
|
||||
from pre_commit import git
|
||||
from pre_commit.clientlib.validate_config import load_config
|
||||
from pre_commit.prefixed_command_runner import PrefixedCommandRunner
|
||||
from pre_commit.repository import Repository
|
||||
from pre_commit.util import cached_property
|
||||
|
||||
|
|
@ -44,3 +45,7 @@ class Runner(object):
|
|||
@cached_property
|
||||
def pre_commit_path(self):
|
||||
return os.path.join(self.git_root, '.git/hooks/pre-commit')
|
||||
|
||||
@cached_property
|
||||
def workspace_runner(self):
|
||||
return PrefixedCommandRunner(C.HOOKS_WORKSPACE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue