aboutsummaryrefslogtreecommitdiff
path: root/nix/libstore
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-07-07 01:03:45 +0200
committerLudovic Courtès <ludo@gnu.org>2015-07-07 01:03:45 +0200
commit399f9acee3be2825e93cdb0832f5b9e3e43fa283 (patch)
tree502f04ab5c990ac3ae6ba42037bafeab54741733 /nix/libstore
parenta8ac45b19ebb3006ced49b46342e01632829cef2 (diff)
downloadguix-399f9acee3be2825e93cdb0832f5b9e3e43fa283.tar
guix-399f9acee3be2825e93cdb0832f5b9e3e43fa283.tar.gz
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'.
Diffstat (limited to 'nix/libstore')
-rw-r--r--nix/libstore/local-store.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc
index b2c78477b6..11f61ae030 100644
--- a/nix/libstore/local-store.cc
+++ b/nix/libstore/local-store.cc
@@ -1176,8 +1176,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);
}
}