Use buildPathsWithResults in build-remote.cc trustless path

It handles failures more correctly; I am glad we have it now!
This commit is contained in:
John Ericson 2023-04-17 09:59:14 -04:00
parent 79ba0ba37a
commit 23ee2d79a9

View file

@ -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]);
}