From 9c766a40cbbd3a350a9582d0fd8201e3361a63b2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 27 Sep 2021 14:44:21 +0200 Subject: [PATCH] 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. --- src/libutil/util.cc | 2 ++ tests/ca/signatures.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 6c7f93d50..bc841f425 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -1716,6 +1716,8 @@ string showBytes(uint64_t bytes) // FIXME: move to libstore/build void commonChildInit(Pipe & logPipe) { + logger = makeSimpleLogger(); + const static string pathNullDevice = "/dev/null"; restoreProcessContext(); diff --git a/tests/ca/signatures.sh b/tests/ca/signatures.sh index 4b4e468f7..0c7d974ea 100644 --- a/tests/ca/signatures.sh +++ b/tests/ca/signatures.sh @@ -22,8 +22,8 @@ testOneCopy () { rm -rf "$REMOTE_STORE_DIR" attrPath="$1" - nix copy --to $REMOTE_STORE "$attrPath" --file ./content-addressed.nix \ - --secret-key-files "$TEST_ROOT/sk1" + nix copy -vvvv --to $REMOTE_STORE "$attrPath" --file ./content-addressed.nix \ + --secret-key-files "$TEST_ROOT/sk1" --show-trace ensureCorrectlyCopied "$attrPath"