aboutsummaryrefslogtreecommitdiff
path: root/src/buildenv
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2017-11-29 11:36:28 +0000
committerLinus Heckemann <git@sphalerite.org>2017-11-29 11:56:15 +0000
commitf986a44980742ce74b6fd3321696f6b4937f696b (patch)
tree83422f941aa3c5cc7f069239044f3298704e3022 /src/buildenv
parentb52846ab5b5d1317a6f7a5967e35b360a731b9c6 (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')
-rw-r--r--src/buildenv/buildenv.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildenv/buildenv.cc b/src/buildenv/buildenv.cc
index f05aa7bf2..eddb9fdaa 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);
}