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/derivation-goal.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/derivation-goal.cc')
-rw-r--r-- | src/libstore/build/derivation-goal.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index 2638d7395..f2c8ccc5f 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -1545,7 +1545,7 @@ Goal::Finished DerivationGoal::done( return Finished{ .result = buildResult.success() ? ecSuccess : ecFailed, - .ex = ex ? std::make_unique<Error>(std::move(*ex)) : nullptr, + .ex = ex ? std::make_shared<Error>(std::move(*ex)) : nullptr, .permanentFailure = buildResult.status == BuildResult::PermanentFailure, .timedOut = buildResult.status == BuildResult::TimedOut, .hashMismatch = anyHashMismatchSeen, |