mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-29 17:16:15 +02:00
Merge pull request #834 from abbradar/master
Propagate path context via builtins.readFile
This commit is contained in:
commit
674c5ff64f
1 changed files with 1 additions and 1 deletions
|
@ -765,7 +765,7 @@ static void prim_readFile(EvalState & state, const Pos & pos, Value * * args, Va
|
||||||
string s = readFile(state.checkSourcePath(path));
|
string s = readFile(state.checkSourcePath(path));
|
||||||
if (s.find((char) 0) != string::npos)
|
if (s.find((char) 0) != string::npos)
|
||||||
throw Error(format("the contents of the file ‘%1%’ cannot be represented as a Nix string") % path);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue