status: Erase the progress bar or spinner.

Previously the progress bar wouldn't be erased by the time the next
"building foo" line would be printed.

* guix/status.scm (print-build-event)[erase-current-line*]: New
procedure.
Call it instead of (display "\r").
master
Ludovic Courtès 2019-02-04 11:27:24 +01:00
parent 3869effdd5
commit 7473bce207
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 8 additions and 1 deletions

View File

@ -465,8 +465,15 @@ addition to build events."
(_
(spin! port))))))
(define erase-current-line*
(if (isatty?* port)
(lambda (port)
(erase-current-line port)
(force-output port))
(const #t)))
(unless print-log?
(display "\r" port)) ;erase the spinner
(erase-current-line* port)) ;clear the spinner or progress bar
(match event
(('build-started drv . _)
(let ((properties (derivation-properties