about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 1c9815a87bf6..b812d1668bc5 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1874,8 +1874,12 @@ void DerivationGoal::startBuilder()
         /* Add the closure of store paths to the chroot. */
         PathSet closure;
         for (auto & i : dirsInChroot)
-            if (worker.store.isInStore(i.second))
-                worker.store.computeFSClosure(worker.store.toStorePath(i.second), closure);
+            try {
+                if (worker.store.isInStore(i.second))
+                    worker.store.computeFSClosure(worker.store.toStorePath(i.second), closure);
+            } catch (Error & e) {
+                throw Error(format("while processing ‘build-sandbox-paths’: %s") % e.what());
+            }
         for (auto & i : closure)
             dirsInChroot[i] = i;