Skip to content

Commit

Permalink
Fix "Unexpected EOF reading a line" error
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lheckemann committed Nov 29, 2017
1 parent b52846a commit f986a44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/buildenv/buildenv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit f986a44

Please sign in to comment.