about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index ebfcc946716a..58ce691ebb07 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -999,7 +999,8 @@ void LocalStore::querySubstitutablePathInfos(const Path & substituter,
     while (true) {
         Path path = readLine(run.from);
         if (path == "") break;
-        assert(paths.find(path) != paths.end());
+        if (paths.find(path) == paths.end())
+            throw Error(format("got unexpected path `%1%' from substituter") % path);
         paths.erase(path);
         SubstitutablePathInfo & info(infos[path]);
         info.deriver = readLine(run.from);