Skip to content

Commit 950faef

Browse files
committed
fixup! internal/dnf: add dnf-handling package
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
1 parent 3da0d32 commit 950faef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/dnf/dnf.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,12 @@ type historyDB struct {
136136
// This function may return a nil *historyDB, which is still safe to use.
137137
func openHistoryDB(ctx context.Context, sys fs.FS) (*historyDB, error) {
138138
var found *dbDesc
139+
Stat:
139140
for _, v := range possible {
140141
switch _, err := fs.Stat(sys, v.Path); {
141142
case errors.Is(err, nil):
142143
found = &v
144+
break Stat
143145
case errors.Is(err, fs.ErrNotExist): // OK
144146
default:
145147
return nil, fmt.Errorf("internal/dnf: unexpected error handling fs.FS: %w", err)

0 commit comments

Comments
 (0)