aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-12-08 11:47:47 +0100
committerGitHub <noreply@github.com>2020-12-08 11:47:47 +0100
commit500161b970ff7bca2ce3459d0cab3e1ffcac7562 (patch)
treef67c4b6b187e98d342cc67014e3d5adc33d85414 /src
parent97dc44f3d6f804888a68bff0035914447763b5f4 (diff)
parent1b1e0760335832c87516b9103b670b34662d5daf (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.cc6
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();