build: fix problem with windows line-endings in CI download

fixes #28890
This commit is contained in:
Martin Holst Swende 2024-01-31 08:13:22 +01:00
parent eaac53ec38
commit 4d32a9e81a
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -40,7 +40,7 @@ func MustLoadChecksums(file string) *ChecksumDB {
if err != nil {
log.Fatal("can't load checksum file: " + err.Error())
}
return &ChecksumDB{strings.Split(string(content), "\n")}
return &ChecksumDB{strings.Split(strings.ReplaceAll(string(content), "\r\n", "\n"), "\n")}
}
// Verify checks whether the given file is valid according to the checksum database.