aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/entry-points.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-10-05 00:38:35 +0200
committereldritch horrors <pennae@lix.systems>2024-10-05 21:19:51 +0000
commit03cbc0ecb9402fe7bbe1a2acd4643995003d7bb2 (patch)
tree47cfc9bcbe1444a93fb6563e350fb7ac8dd85ed7 /src/libstore/build/entry-points.cc
parent1caf2afb1d1fffe0ff54244d335c168f4c32cbdf (diff)
libstore: move Goal::ex to WorkResult
yet another duplicated field. it's the last one though. Change-Id: I352df8d306794d262d8c9066f3be78acd40e82cf
Diffstat (limited to 'src/libstore/build/entry-points.cc')
-rw-r--r--src/libstore/build/entry-points.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstore/build/entry-points.cc b/src/libstore/build/entry-points.cc
index edfad3cbb..808179a4d 100644
--- a/src/libstore/build/entry-points.cc
+++ b/src/libstore/build/entry-points.cc
@@ -26,11 +26,11 @@ void Store::buildPaths(const std::vector<DerivedPath> & reqs, BuildMode buildMod
StringSet failed;
std::shared_ptr<Error> ex;
for (auto & [i, result] : goals) {
- if (i->ex) {
+ if (result.ex) {
if (ex)
- logError(i->ex->info());
+ logError(result.ex->info());
else
- ex = i->ex;
+ ex = result.ex;
}
if (result.exitCode != Goal::ecSuccess) {
if (auto i2 = dynamic_cast<DerivationGoal *>(i.get()))
@@ -119,9 +119,9 @@ void Store::ensurePath(const StorePath & path)
auto [goal, result] = *goals.begin();
if (result.exitCode != Goal::ecSuccess) {
- if (goal->ex) {
- goal->ex->withExitStatus(worker.failingExitStatus());
- throw std::move(*goal->ex);
+ if (result.ex) {
+ result.ex->withExitStatus(worker.failingExitStatus());
+ throw std::move(*result.ex);
} else
throw Error(worker.failingExitStatus(), "path '%s' does not exist and cannot be created", printStorePath(path));
}