From 70afaeebca9f27a7f85fa930c5c954f680cb5f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 17 Sep 2022 10:48:25 +0200 Subject: [PATCH] avoid shadowing metaName --- src/nix-eval-jobs.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nix-eval-jobs.cc b/src/nix-eval-jobs.cc index 68b6416..a8d56ab 100644 --- a/src/nix-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -217,11 +217,11 @@ struct Drv { if (myArgs.meta) { nlohmann::json meta_; - for (auto &name : drvInfo.queryMetaNames()) { + for (auto &metaName : drvInfo.queryMetaNames()) { PathSet context; std::stringstream ss; - auto metaValue = drvInfo.queryMeta(name); + auto metaValue = drvInfo.queryMeta(metaName); // Skip non-serialisable types // TODO: Fix serialisation of derivations to store paths if (metaValue == 0) { @@ -230,7 +230,7 @@ struct Drv { printValueAsJSON(state, true, *metaValue, noPos, ss, context); - meta_[name] = nlohmann::json::parse(ss.str()); + meta_[metaName] = nlohmann::json::parse(ss.str()); } meta = meta_; }