aboutsummaryrefslogtreecommitdiff
path: root/src/build-remote/build-remote.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/build-remote/build-remote.cc')
-rw-r--r--src/build-remote/build-remote.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc
index 00340b787..e07117496 100644
--- a/src/build-remote/build-remote.cc
+++ b/src/build-remote/build-remote.cc
@@ -200,9 +200,12 @@ static int _main(int argc, char * * argv)
} catch (std::exception & e) {
auto msg = chomp(drainFD(5, false));
- printError("cannot build on '%s': %s%s",
- bestMachine->storeUri, e.what(),
- (msg.empty() ? "" : ": " + msg));
+ logError({
+ .name = "Remote build",
+ .hint = hintfmt("cannot build on '%s': %s%s",
+ bestMachine->storeUri, e.what(),
+ (msg.empty() ? "" : ": " + msg))
+ });
bestMachine->enabled = false;
continue;
}
@@ -241,7 +244,7 @@ connected:
uploadLock = -1;
- BasicDerivation drv(readDerivation(*store, store->realStoreDir + "/" + std::string(drvPath->to_string())));
+ auto drv = store->readDerivation(*drvPath);
drv.inputSrcs = store->parseStorePathSet(inputs);
auto result = sshStore->buildDerivation(*drvPath, drv);