refactor: keep only one struct for package

This commit is contained in:
2025-06-12 13:11:41 +03:00
parent e259184a89
commit ad8b669fa6
34 changed files with 678 additions and 580 deletions

View File

@@ -123,8 +123,15 @@ func (b *AppBuilder) withRepos(enablePull, forcePull bool) *AppBuilder {
cfg := b.deps.Cfg
db := b.deps.DB
if cfg == nil || db == nil {
b.err = errors.New("config and db are required before initializing repos")
info := b.deps.Info
if info == nil {
b.WithDistroInfo()
info = b.deps.Info
}
if cfg == nil || db == nil || info == nil {
b.err = errors.New("config, db and info are required before initializing repos")
return b
}