diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-03-09 12:25:35 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-03-09 12:25:35 +0100 |
commit | 761242afa08d5c9280ba6bd63a310b4334b83bb2 (patch) | |
tree | 7509dfda4c52ecab6e972e3f1ed9d3b1d0360b5b /src/libstore/build/entry-points.cc | |
parent | a4604f19284254ac98f19a13ff7c2216de7fe176 (diff) |
BuildResult: Use DerivedPath
Diffstat (limited to 'src/libstore/build/entry-points.cc')
-rw-r--r-- | src/libstore/build/entry-points.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/libstore/build/entry-points.cc b/src/libstore/build/entry-points.cc index b2f87aa82..bea7363db 100644 --- a/src/libstore/build/entry-points.cc +++ b/src/libstore/build/entry-points.cc @@ -82,17 +82,16 @@ BuildResult Store::buildDerivation(const StorePath & drvPath, const BasicDerivat Worker worker(*this, *this); auto goal = worker.makeBasicDerivationGoal(drvPath, drv, {}, buildMode); - BuildResult result; - try { worker.run(Goals{goal}); - result = goal->buildResult; + return goal->buildResult; } catch (Error & e) { - result.status = BuildResult::MiscFailure; - result.errorMsg = e.msg(); - } - - return result; + return BuildResult { + .status = BuildResult::MiscFailure, + .errorMsg = e.msg(), + .path = DerivedPath::Built { .drvPath = drvPath }, + }; + }; } |