mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
daemon: Flush upon '\r' when reading the substituter's stderr.
This commit had been inadvertently reverted in 322eeb8
.
* nix/libstore/local-store.cc (LocalStore::getLineFromSubstituter):
Flush when the line contains '\r'.
This commit is contained in:
parent
a8ac45b19e
commit
399f9acee3
1 changed files with 4 additions and 2 deletions
|
@ -1176,8 +1176,10 @@ string LocalStore::getLineFromSubstituter(RunningSubstituter & run)
|
||||||
if (n == 0) throw EndOfFile(format("substituter `%1%' died unexpectedly") % run.program);
|
if (n == 0) throw EndOfFile(format("substituter `%1%' died unexpectedly") % run.program);
|
||||||
err.append(buf, n);
|
err.append(buf, n);
|
||||||
string::size_type p;
|
string::size_type p;
|
||||||
while ((p = err.find('\n')) != string::npos) {
|
while (((p = err.find('\n')) != string::npos)
|
||||||
printMsg(lvlError, run.program + ": " + string(err, 0, p));
|
|| ((p = err.find('\r')) != string::npos)) {
|
||||||
|
string thing(err, 0, p + 1);
|
||||||
|
writeToStderr(run.program + ": " + thing);
|
||||||
err = string(err, p + 1);
|
err = string(err, p + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue