mirror of
https://github.com/mudler/luet.git
synced 2025-09-01 23:37:07 +00:00
Handle case when no packages are installed in the system, and add test for it
This commit is contained in:
@@ -82,6 +82,10 @@ func (s *Solver) BuildFormula() (bf.Formula, error) {
|
||||
return nil, err
|
||||
}
|
||||
W := bf.Var(encodedW)
|
||||
if len(s.Installed) == 0 {
|
||||
formulas = append(formulas, bf.And(bf.True, W))
|
||||
continue
|
||||
}
|
||||
for _, installed := range s.Installed {
|
||||
encodedI, err := installed.IsFlagged(true).Encode()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user