fix(upgrades): avoid clobbering cache when filtering (#9752)

The slice is shared, can't overwrite elements of it. (Upgrade server
only thing.)
This commit is contained in:
Jakob Borg 2024-10-02 13:56:39 -05:00 committed by GitHub
parent cfa834177b
commit 47f48faed7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -227,7 +227,7 @@ func filterForCompabitility(rels []upgrade.Release, ua, osv string) []upgrade.Re
}
os := osArch[1]
filtered := rels[:0]
var filtered []upgrade.Release
for _, rel := range rels {
if rel.Compatibility == nil {
// No requirements means it's compatible with everything.