Skip to content

Commit

Permalink
Propagate path context via builtins.readFile
Browse files Browse the repository at this point in the history
  • Loading branch information
abbradar committed Mar 4, 2016
1 parent 0a26b56 commit f7f0116
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libexpr/primops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ static void prim_readFile(EvalState & state, const Pos & pos, Value * * args, Va
string s = readFile(state.checkSourcePath(path));
if (s.find((char) 0) != string::npos)
throw Error(format("the contents of the file ‘%1%’ cannot be represented as a Nix string") % path);
mkString(v, s.c_str());
mkString(v, s.c_str(), context);
}


Expand Down

0 comments on commit f7f0116

Please sign in to comment.