Skip to content

Commit

Permalink
parseExprFromFile -> evalFile
Browse files Browse the repository at this point in the history
parseExprFromFile() should be avoided since it doesn't cache anything.
  • Loading branch information
edolstra committed Jan 16, 2018
1 parent ba75c69 commit 23fa7e3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/nix/installables.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ Value * SourceExprCommand::getSourceExpr(EvalState & state)

vSourceExpr = state.allocValue();

if (file != "") {
Expr * e = state.parseExprFromFile(resolveExprPath(lookupFileArg(state, file)));
state.eval(e, *vSourceExpr);
}
if (file != "")
state.evalFile(lookupFileArg(state, file), *vSourceExpr);

else {

Expand Down

0 comments on commit 23fa7e3

Please sign in to comment.