From 278f86a43f1561b1c064ce88da012db414ec7efc Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Wed, 10 Oct 2018 16:42:02 -0500 Subject: ui: Fix port-buffering with guile@2.0. * guix/status.scm (build-event-output-port)[guile@2.0]: Do not call 'setvbuf' on custom binary port. * tests/status.scm (current-build-output-port, UTF-8 + garbage)[guile@2.0]: Use "?" in place of REPLACEMENT CHARACTER. --- guix/status.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'guix/status.scm') diff --git a/guix/status.scm b/guix/status.scm index 8e05d4eb76..ffa9d9e93c 100644 --- a/guix/status.scm +++ b/guix/status.scm @@ -588,8 +588,9 @@ (define port ;; The build port actually receives Unicode strings. (set-port-encoding! port "UTF-8") - (setvbuf port (cond-expand (guile-2.2 'line) (else _IOLBF))) - + (cond-expand + ((and guile-2 (not guile-2.2)) #t) + (else (setvbuf port 'line))) (values port (lambda () %state))) (define (call-with-status-report on-event thunk) -- cgit v1.2.3