about summary refs log tree commit diff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-12-17T11·28+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-12-17T11·28+0000
commitb1eb25217217087cb70a730da5311bd0890cf6ad (patch)
treea95273ff41849891960d878d9935bb82771bafcd /src/libstore/remote-store.cc
parenteac93d6efeba68d9da95f01e10cd859eef6d85dd (diff)
* Propagate the "100" exit status for failed builds through the Nix
  daemon.

Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 26093a5d3a..ae99846a3d 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -509,8 +509,11 @@ void RemoteStore::processStderr(Sink * sink, Source * source)
             writeToStderr((const unsigned char *) s.c_str(), s.size());
         }
     }
-    if (msg == STDERR_ERROR)
-        throw Error(readString(from));
+    if (msg == STDERR_ERROR) {
+        string error = readString(from);
+        unsigned int status = GET_PROTOCOL_MINOR(daemonVersion) >= 8 ? readInt(from) : 1;
+        throw Error(error, status);
+    }
     else if (msg != STDERR_LAST)
         throw Error("protocol error processing standard error");
 }