Skip to content

Commit

Permalink
Merge branch 'flakes_filterSource' of https://github.com/tomberek/nix
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Oct 6, 2021
2 parents 57a8eb4 + d90582b commit c497fce
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/libexpr/primops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,20 @@ 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;
}
}


Expand Down

0 comments on commit c497fce

Please sign in to comment.