avoid shadowing metaName

This commit is contained in:
Jörg Thalheim 2022-09-17 10:48:25 +02:00
parent 40c4761a2d
commit 70afaeebca

View file

@ -217,11 +217,11 @@ struct Drv {
if (myArgs.meta) { if (myArgs.meta) {
nlohmann::json meta_; nlohmann::json meta_;
for (auto &name : drvInfo.queryMetaNames()) { for (auto &metaName : drvInfo.queryMetaNames()) {
PathSet context; PathSet context;
std::stringstream ss; std::stringstream ss;
auto metaValue = drvInfo.queryMeta(name); auto metaValue = drvInfo.queryMeta(metaName);
// Skip non-serialisable types // Skip non-serialisable types
// TODO: Fix serialisation of derivations to store paths // TODO: Fix serialisation of derivations to store paths
if (metaValue == 0) { if (metaValue == 0) {
@ -230,7 +230,7 @@ struct Drv {
printValueAsJSON(state, true, *metaValue, noPos, ss, context); printValueAsJSON(state, true, *metaValue, noPos, ss, context);
meta_[name] = nlohmann::json::parse(ss.str()); meta_[metaName] = nlohmann::json::parse(ss.str());
} }
meta = meta_; meta = meta_;
} }