diff options
author | eldritch horrors <pennae@lix.systems> | 2024-08-25 13:41:56 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-08-25 21:21:55 +0000 |
commit | 398894b85672f5197b5fc3eeae3fa2ec32f03908 (patch) | |
tree | 06d7f19c7713ac4a011aa03b4e5e596dfcdddedf /src/libstore/build/entry-points.cc | |
parent | 30a87b4cd5830c6205055ddba5743c69004e37df (diff) |
libstore: make Goal::ex a shared_ptr
this makes WorkResult copyable, and just all around easier to deal with.
in the future we'll need this to let Goal::work() return a promise for a
WorkResult (or even just a Finished) that can be awaited by other goals.
Change-Id: Ic5a1ce04c5a0f8e683bd00a2ed2b77a2e28989c1
Diffstat (limited to 'src/libstore/build/entry-points.cc')
-rw-r--r-- | src/libstore/build/entry-points.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/build/entry-points.cc b/src/libstore/build/entry-points.cc index c6955600e..f52f2876f 100644 --- a/src/libstore/build/entry-points.cc +++ b/src/libstore/build/entry-points.cc @@ -16,13 +16,13 @@ void Store::buildPaths(const std::vector<DerivedPath> & reqs, BuildMode buildMod worker.run(goals); StringSet failed; - std::optional<Error> ex; + std::shared_ptr<Error> ex; for (auto & i : goals) { if (i->ex) { if (ex) logError(i->ex->info()); else - ex = std::move(*i->ex); + ex = i->ex; } if (i->exitCode != Goal::ecSuccess) { if (auto i2 = dynamic_cast<DerivationGoal *>(i.get())) |