diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-10-25T11·01+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-10-25T11·01+0200 |
commit | 2d5b1b24bf70a498e4c0b378704cfdb6471cc699 (patch) | |
tree | 80e7c28cb3431ed6a3fbb080f769f9016ea564c5 /src/libexpr | |
parent | ac12517f3e969db9fb4834fdfd2da63101ffd3de (diff) |
Pass lists/attrsets to bash as (associative) arrays
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/primops.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index fcd3f8efee3f..afd344286607 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -713,7 +713,7 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * * if (outputHashRecursive) outputHashAlgo = "r:" + outputHashAlgo; Path outPath = state.store->makeFixedOutputPath(outputHashRecursive, h, drvName); - drv.env["out"] = outPath; + if (!jsonObject) drv.env["out"] = outPath; drv.outputs["out"] = DerivationOutput(outPath, outputHashAlgo, *outputHash); } @@ -724,7 +724,7 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * * an empty value. This ensures that changes in the set of output names do get reflected in the hash. */ for (auto & i : outputs) { - drv.env[i] = ""; + if (!jsonObject) drv.env[i] = ""; drv.outputs[i] = DerivationOutput("", "", ""); } @@ -735,7 +735,7 @@ static void prim_derivationStrict(EvalState & state, const Pos & pos, Value * * for (auto & i : drv.outputs) if (i.second.path == "") { Path outPath = state.store->makeOutputPath(i.first, h, drvName); - drv.env[i.first] = outPath; + if (!jsonObject) drv.env[i.first] = outPath; i.second.path = outPath; } } |