diff options
author | Linus Heckemann <git@sphalerite.org> | 2017-11-29T11·36+0000 |
---|---|---|
committer | Linus Heckemann <git@sphalerite.org> | 2017-11-29T11·56+0000 |
commit | f986a44980742ce74b6fd3321696f6b4937f696b (patch) | |
tree | 83422f941aa3c5cc7f069239044f3298704e3022 /src/buildenv/buildenv.cc | |
parent | b52846ab5b5d1317a6f7a5967e35b360a731b9c6 (diff) |
Fix "Unexpected EOF reading a line" error
propagated-user-env-packages files in nixpkgs aren't all terminated by newlines, as buildenv expected. Now it does not require a terminating newline; note that this introduces a behaviour change: propagated user env packages may now be spread across multiple lines. However, nix 1.11.x still expects them to be on a single line so this shouldn't be used in nixpkgs for now.
Diffstat (limited to 'src/buildenv/buildenv.cc')
-rw-r--r-- | src/buildenv/buildenv.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildenv/buildenv.cc b/src/buildenv/buildenv.cc index f05aa7bf2fbb..eddb9fdaa8d2 100644 --- a/src/buildenv/buildenv.cc +++ b/src/buildenv/buildenv.cc @@ -115,9 +115,9 @@ static void addPkg(const Path & pkgDir, int priority) return; throw SysError(format("opening '%1%'") % propagatedFN); } - propagated = readLine(fd.get()); + propagated = readFile(fd.get()); } - for (const auto & p : tokenizeString<std::vector<string>>(propagated, " ")) + for (const auto & p : tokenizeString<std::vector<string>>(propagated, " \n")) if (done.find(p) == done.end()) postponed.insert(p); } |