From 13654a52f7c70a143b1dd51416d633e1071faffb Mon Sep 17 00:00:00 2001 From: "ricardo.bartels@telekom.de" Date: Wed, 14 Aug 2024 09:04:36 +0200 Subject: [PATCH] Revering change unrelated to issue #13176 Signed-off-by: ricardo.bartels@telekom.de (cherry picked from commit cdbef2b7d1862e6fe4253e39740afbc5ec405679) --- pkg/repo/index.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/repo/index.go b/pkg/repo/index.go index 17d8d33e1..e1ce3c62d 100644 --- a/pkg/repo/index.go +++ b/pkg/repo/index.go @@ -353,10 +353,6 @@ func loadIndex(data []byte, source string) (*IndexFile, error) { return i, err } - if i.APIVersion == "" { - return i, ErrNoAPIVersion - } - for name, cvs := range i.Entries { for idx := len(cvs) - 1; idx >= 0; idx-- { if cvs[idx] == nil { @@ -379,6 +375,9 @@ func loadIndex(data []byte, source string) (*IndexFile, error) { i.Entries[name] = cvs } i.SortEntries() + if i.APIVersion == "" { + return i, ErrNoAPIVersion + } return i, nil }