mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Lazily install repositories
This commit is contained in:
parent
2a984c3746
commit
10912fa03e
2 changed files with 14 additions and 24 deletions
|
|
@ -46,10 +46,7 @@ class Runner(object):
|
|||
def repositories(self):
|
||||
"""Returns a tuple of the configured repositories."""
|
||||
repos = self.config['repos']
|
||||
repos = tuple(Repository.create(x, self.store) for x in repos)
|
||||
for repo in repos:
|
||||
repo.require_installed()
|
||||
return repos
|
||||
return tuple(Repository.create(x, self.store) for x in repos)
|
||||
|
||||
def get_hook_path(self, hook_type):
|
||||
return os.path.join(self.git_dir, 'hooks', hook_type)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue