aboutsummaryrefslogtreecommitdiff
path: root/src/build-remote
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-04-17 09:59:14 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-04-17 13:49:14 -0400
commit23ee2d79a90ace2fe012f32c37121f50afc35223 (patch)
tree6876df9172c423fa325970fb3c25f8cb7fd6b4c4 /src/build-remote
parent79ba0ba37ab35ac5ea94fa1db1fc46a5b7588ece (diff)
Use `buildPathsWithResults` in build-remote.cc trustless path
It handles failures more correctly; I am glad we have it now!
Diffstat (limited to 'src/build-remote')
-rw-r--r--src/build-remote/build-remote.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc
index b0bc8a9ff..403f0fb17 100644
--- a/src/build-remote/build-remote.cc
+++ b/src/build-remote/build-remote.cc
@@ -332,7 +332,10 @@ connected:
throw Error("build of '%s' on '%s' failed: %s", store->printStorePath(*drvPath), storeUri, result.errorMsg);
} else {
copyPaths(*store, *sshStore, StorePathSet {*drvPath}, NoRepair, NoCheckSigs, substitute);
- sshStore->buildPaths({ DerivedPath::Built { *drvPath, OutputsSpec::All {} } });
+ auto res = sshStore->buildPathsWithResults({ DerivedPath::Built { *drvPath, OutputsSpec::All {} } });
+ // One path to build should mean one result back
+ assert(res.size() == 1);
+ optResult = std::move(res[0]);
}