From e4bdd490227b91505def7df4ac786bfdb60e88c6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 8 Sep 2016 17:30:25 +0200 Subject: [PATCH] Give a better error message if a path in build-sandbox-paths is invalid --- src/libstore/build.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 1c9815a87..b812d1668 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;