Lazily install repositories

This commit is contained in:
Anthony Sottile
2017-10-20 13:04:33 -07:00
parent 2a984c3746
commit 10912fa03e
2 changed files with 14 additions and 24 deletions

View File

@@ -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)