From ebfceeb333120411af46d0af4805f3e7d557159f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 8 May 2017 14:27:12 +0200 Subject: [PATCH] build-remote: Check remote build status --- src/build-remote/build-remote.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc index 8876da6c0..7ffbdca7c 100644 --- a/src/build-remote/build-remote.cc +++ b/src/build-remote/build-remote.cc @@ -208,7 +208,10 @@ connected: drv.inputSrcs = inputs; printError("building ‘%s’ on ‘%s’", drvPath, storeUri); - sshStore->buildDerivation(drvPath, drv); + auto result = sshStore->buildDerivation(drvPath, drv); + + if (!result.success()) + throw Error("build of ‘%s’ on ‘%s’ failed: %s", drvPath, storeUri, result.errorMsg); PathSet missing; for (auto & path : outputs)