forked from lix-project/lix
Don't barf if corepkgs is in the store but not a valid path
This can happen when using a dummy store (or indeed any non-local store).
This commit is contained in:
parent
6a67e57019
commit
d9a8619762
|
@ -381,10 +381,14 @@ EvalState::EvalState(const Strings & _searchPath, ref<Store> store)
|
||||||
auto path = r.second;
|
auto path = r.second;
|
||||||
|
|
||||||
if (store->isInStore(r.second)) {
|
if (store->isInStore(r.second)) {
|
||||||
|
try {
|
||||||
StorePathSet closure;
|
StorePathSet closure;
|
||||||
store->computeFSClosure(store->toStorePath(r.second).first, closure);
|
store->computeFSClosure(store->toStorePath(r.second).first, closure);
|
||||||
for (auto & path : closure)
|
for (auto & path : closure)
|
||||||
allowedPaths->insert(store->printStorePath(path));
|
allowedPaths->insert(store->printStorePath(path));
|
||||||
|
} catch (InvalidPath &) {
|
||||||
|
allowedPaths->insert(r.second);
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
allowedPaths->insert(r.second);
|
allowedPaths->insert(r.second);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue