1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00

Merge pull request #10950 from NixOS/backport-10943-to-2.23-maintenance

[Backport 2.23-maintenance] Accept response from gitlab api with more than one entry in json
This commit is contained in:
Eelco Dolstra 2024-06-24 14:24:53 +02:00 committed by GitHub
commit d7f018041e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -433,7 +433,7 @@ struct GitLabInputScheme : GitArchiveInputScheme
store->toRealPath( store->toRealPath(
downloadFile(store, url, "source", headers).storePath))); downloadFile(store, url, "source", headers).storePath)));
if (json.is_array() && json.size() == 1 && json[0]["id"] != nullptr) { if (json.is_array() && json.size() >= 1 && json[0]["id"] != nullptr) {
return RefInfo { return RefInfo {
.rev = Hash::parseAny(std::string(json[0]["id"]), HashAlgorithm::SHA1) .rev = Hash::parseAny(std::string(json[0]["id"]), HashAlgorithm::SHA1)
}; };