diff --git a/lib/spack/llnl/util/tty/log.py b/lib/spack/llnl/util/tty/log.py index efcd487f23f..a7a4637ba9a 100644 --- a/lib/spack/llnl/util/tty/log.py +++ b/lib/spack/llnl/util/tty/log.py @@ -780,7 +780,12 @@ def _writer_daemon(stdin_multiprocess_fd, read_multiprocess_fd, write_fd, echo, try: while line_count < 100: # Handle output from the calling process. - line = _retry(in_pipe.readline)() + try: + line = _retry(in_pipe.readline)() + except UnicodeDecodeError: + # installs like --test=root gpgme produce non-UTF8 logs + line = '\n' + if not line: return line_count += 1