diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-12-08 11:47:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 11:47:47 +0100 |
commit | 500161b970ff7bca2ce3459d0cab3e1ffcac7562 (patch) | |
tree | f67c4b6b187e98d342cc67014e3d5adc33d85414 /src | |
parent | 97dc44f3d6f804888a68bff0035914447763b5f4 (diff) | |
parent | 1b1e0760335832c87516b9103b670b34662d5daf (diff) |
Merge pull request #4326 from tweag/fix-post-build-hook-and-remote-builders
Re-query for the derivation outputs in the post-build-hook
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/build/derivation-goal.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index 1db85bd37..fdf777c27 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -899,8 +899,10 @@ void DerivationGoal::buildDone() Logger::Fields{worker.store.printStorePath(drvPath)}); PushActivity pact(act.id); StorePathSet outputPaths; - for (auto i : drv->outputs) { - outputPaths.insert(finalOutputs.at(i.first)); + for (auto& [_, maybeOutPath] : + worker.store.queryPartialDerivationOutputMap(drvPath)) { + if (maybeOutPath) + outputPaths.insert(*maybeOutPath); } std::map<std::string, std::string> hookEnvironment = getEnv(); |