diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-09-08T15·30+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-09-08T15·30+0200 |
commit | e4bdd490227b91505def7df4ac786bfdb60e88c6 (patch) | |
tree | 596858094787dbae0bea92e6d7d335c8b5b911e6 /src/libstore/build.cc | |
parent | 0babc4ff317bcf1a130790d7ee290b1ebc4ec842 (diff) |
Give a better error message if a path in build-sandbox-paths is invalid
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r-- | src/libstore/build.cc | 8 |
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; |