Merge pull request #834 from abbradar/master

Propagate path context via builtins.readFile
This commit is contained in:
Eelco Dolstra 2016-03-10 20:17:03 +01:00
commit 674c5ff64f

View file

@ -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);
}