diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2023-01-23 15:42:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-23 15:42:59 +0100 |
commit | 0a9acefeb5ca7c800054f328d6da24e3a333cbbd (patch) | |
tree | d99654d879afe3d39c15ce2809b564c1eeecb194 /src/libexpr/primops | |
parent | a58e9c3860e8be5030bb3d5e0a78c0e44e997b17 (diff) | |
parent | 0afdf4084cc866610d0a0b6f46221680c8420cbf (diff) |
Merge pull request #7657 from obsidiansystems/fix-7655
Fix #7655
Diffstat (limited to 'src/libexpr/primops')
-rw-r--r-- | src/libexpr/primops/context.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libexpr/primops/context.cc b/src/libexpr/primops/context.cc index 0c65a6b98..db43e5771 100644 --- a/src/libexpr/primops/context.cc +++ b/src/libexpr/primops/context.cc @@ -83,15 +83,13 @@ static void prim_getContext(EvalState & state, const PosIdx pos, Value * * args, state.forceString(*args[0], context, pos, "while evaluating the argument passed to builtins.getContext"); auto contextInfos = std::map<StorePath, ContextInfo>(); for (const auto & p : context) { - Path drv; - std::string output; NixStringContextElem ctx = NixStringContextElem::parse(*state.store, p); std::visit(overloaded { [&](NixStringContextElem::DrvDeep & d) { contextInfos[d.drvPath].allOutputs = true; }, [&](NixStringContextElem::Built & b) { - contextInfos[b.drvPath].outputs.emplace_back(std::move(output)); + contextInfos[b.drvPath].outputs.emplace_back(std::move(b.output)); }, [&](NixStringContextElem::Opaque & o) { contextInfos[o.path].path = true; |