File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -677,7 +677,15 @@ Goal::Co DerivationBuildingGoal::tryToBuild()
677677 {
678678 builder.reset ();
679679 StorePathSet outputPaths;
680- for (auto & [_, output] : builtOutputs) {
680+ /* In the check case we install no store objects, and so
681+ `builtOutputs` is empty. However, per issue #14287, there is
682+ an expectation that the post-build hook is still executed.
683+ (This is useful for e.g. logging successful deterministic rebuilds.)
684+
685+ In order to make that work, in the check case just load the
686+ (preexisting) infos from scratch, rather than relying on what
687+ `DerivationBuilder` returned to us. */
688+ for (auto & [_, output] : buildMode == bmCheck ? checkPathValidity (initialOutputs).second : builtOutputs) {
681689 // for sake of `bmRepair`
682690 worker.markContentsGood (output.outPath );
683691 outputPaths.insert (output.outPath );
You can’t perform that action at this time.
0 commit comments