aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-10-06 18:08:37 +0200
committerEelco Dolstra <edolstra@gmail.com>2021-10-06 18:08:37 +0200
commit0dc8172458022bf412f6ffa1653802b2522514a6 (patch)
tree928736975020114a3f0754e5eb2e7b46fba5ac20
parentc497fce0111219999b37c05030f766d8cf8f901e (diff)
Remove no-op call to realiseContext()
-rw-r--r--src/libexpr/primops.cc13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index acb5d3cef..fbe39854d 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -1891,20 +1891,9 @@ static void addPath(EvalState & state, const Pos & pos, const string & name, con
dstPath = state.store->printStorePath(*expectedStorePath);
mkString(v, dstPath, {dstPath});
+
if (state.allowedPaths)
state.allowedPaths->insert(v.string.s);
-
- try {
- state.realiseContext({});
- } catch (InvalidPathError & e) {
- throw EvalError({
- .msg = hintfmt("cannot import '%1%', since path '%2%' is not valid", path, e.path),
- .errPos = pos
- });
- } catch (Error & e) {
- e.addTrace(pos, "while importing '%s'", path);
- throw e;
- }
}