Merge pull request #4326 from tweag/fix-post-build-hook-and-remote-builders

Re-query for the derivation outputs in the post-build-hook
This commit is contained in:
Eelco Dolstra 2020-12-08 11:47:47 +01:00 committed by GitHub
commit 500161b970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();