Fix 'error: reading a line: Input/output error' in startBuilder()

With -vvvv, the ProgressBar was polluting the stderr of the child,
messing up its \2 message to the parent.
This commit is contained in:
Eelco Dolstra 2021-09-27 14:44:21 +02:00
parent 8430a8f086
commit 9c766a40cb
2 changed files with 4 additions and 2 deletions

View file

@ -1716,6 +1716,8 @@ string showBytes(uint64_t bytes)
// FIXME: move to libstore/build // FIXME: move to libstore/build
void commonChildInit(Pipe & logPipe) void commonChildInit(Pipe & logPipe)
{ {
logger = makeSimpleLogger();
const static string pathNullDevice = "/dev/null"; const static string pathNullDevice = "/dev/null";
restoreProcessContext(); restoreProcessContext();

View file

@ -22,8 +22,8 @@ testOneCopy () {
rm -rf "$REMOTE_STORE_DIR" rm -rf "$REMOTE_STORE_DIR"
attrPath="$1" attrPath="$1"
nix copy --to $REMOTE_STORE "$attrPath" --file ./content-addressed.nix \ nix copy -vvvv --to $REMOTE_STORE "$attrPath" --file ./content-addressed.nix \
--secret-key-files "$TEST_ROOT/sk1" --secret-key-files "$TEST_ROOT/sk1" --show-trace
ensureCorrectlyCopied "$attrPath" ensureCorrectlyCopied "$attrPath"