me
/
guix
Archived
1
0
Fork 0

daemon: Flush upon '\r' when reading the substituter's stderr.

* nix/libstore/local-store.cc (LocalStore::getLineFromSubstituter):
  Flush when the line contains '\r'.
master
Ludovic Courtès 2015-01-05 22:51:03 +01:00
parent 46b8aadbd6
commit 9ba0b8d3d0
1 changed files with 4 additions and 2 deletions

View File

@ -1168,8 +1168,10 @@ string LocalStore::getLineFromSubstituter(RunningSubstituter & run)
if (n == 0) throw EndOfFile(format("substituter `%1%' died unexpectedly") % run.program);
err.append(buf, n);
string::size_type p;
while ((p = err.find('\n')) != string::npos) {
printMsg(lvlError, run.program + ": " + string(err, 0, p));
while (((p = err.find('\n')) != string::npos)
|| ((p = err.find('\r')) != string::npos)) {
string thing(err, 0, p + 1);
writeToStderr(run.program + ": " + thing);
err = string(err, p + 1);
}
}