Merge pull request #10181 from NixOS/backport-10169-to-2.17-maintenance

[Backport 2.17-maintenance] [Backport 2.19-maintenance] Faster flake lock parsing
This commit is contained in:
Robert Hensing
2024-03-07 19:15:43 +01:00
committed by GitHub

View File

@@ -89,7 +89,7 @@ LockFile::LockFile(const nlohmann::json & json, const Path & path)
std::string inputKey = i.value();
auto k = nodeMap.find(inputKey);
if (k == nodeMap.end()) {
auto nodes = json["nodes"];
auto & nodes = json["nodes"];
auto jsonNode2 = nodes.find(inputKey);
if (jsonNode2 == nodes.end())
throw Error("lock file references missing node '%s'", inputKey);