aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/derivation-goal.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/build/derivation-goal.cc')
-rw-r--r--src/libstore/build/derivation-goal.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc
index a59984688..7c18f8b60 100644
--- a/src/libstore/build/derivation-goal.cc
+++ b/src/libstore/build/derivation-goal.cc
@@ -923,12 +923,16 @@ void runPostBuildHook(
};
LogSink sink(act);
- runProgram2({
+ auto proc = runProgram2({
.program = settings.postBuildHook,
.environment = hookEnvironment,
- .standardOut = &sink,
+ .captureStdout = true,
.mergeStderrToStdout = true,
- }).wait();
+ });
+ Finally const _wait([&] { proc.wait(); });
+
+ // FIXME just process the data, without a wrapper sink class
+ proc.stdout()->drainInto(sink);
}
void DerivationGoal::buildDone()