about summary refs log tree commit diff
path: root/src/nix-store/nix-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r--src/nix-store/nix-store.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 42012f2e73ab..f874ffeadc3e 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -1013,15 +1013,15 @@ static void opServe(Strings opFlags, Strings opArgs)
                 settings.maxSilentTime = readInt(in);
                 settings.buildTimeout = readInt(in);
 
-                int res = 0;
                 try {
                     MonitorFdHup monitor(in.fd);
                     store->buildPaths(paths);
+                    writeInt(0, out);
                 } catch (Error & e) {
-                    printMsg(lvlError, format("error: %1%") % e.msg());
-                    res = e.status;
+                    assert(e.status);
+                    writeInt(e.status, out);
+                    writeString(e.msg(), out);
                 }
-                writeInt(res, out);
                 break;
             }