aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r--src/libexpr/eval.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index d678231c6..139067f20 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -370,7 +370,11 @@ EvalState::EvalState(const Strings & _searchPath, ref<Store> store)
for (auto & i : _searchPath) addToSearchPath(i);
for (auto & i : evalSettings.nixPath.get()) addToSearchPath(i);
}
- addToSearchPath("nix=" + canonPath(settings.nixDataDir + "/nix/corepkgs", true));
+
+ try {
+ addToSearchPath("nix=" + canonPath(settings.nixDataDir + "/nix/corepkgs", true));
+ } catch (Error &) {
+ }
if (evalSettings.restrictEval || evalSettings.pureEval) {
allowedPaths = PathSet();