Give a better error message if a path in build-sandbox-paths is invalid

This commit is contained in:
Eelco Dolstra 2016-09-08 17:30:25 +02:00
parent 0babc4ff31
commit e4bdd49022

View file

@ -1874,8 +1874,12 @@ void DerivationGoal::startBuilder()
/* Add the closure of store paths to the chroot. */ /* Add the closure of store paths to the chroot. */
PathSet closure; PathSet closure;
for (auto & i : dirsInChroot) for (auto & i : dirsInChroot)
if (worker.store.isInStore(i.second)) try {
worker.store.computeFSClosure(worker.store.toStorePath(i.second), closure); 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) for (auto & i : closure)
dirsInChroot[i] = i; dirsInChroot[i] = i;