mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
status: Do not systematically erase the previous line.
After a successful download, we'd erase the download-progress line, and the end result would be two empty lines following the "downloading …" line. Reported by Ricardo Wurmus <rekado@elephly.net> at <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33470#27>. * guix/status.scm (print-build-event)[erase-current-line*]: Set to a no-op when PRINT-LOG? is true. Move calls to 'erase-current-line*' to the 'build-succeeded' and 'build-failed' events.
This commit is contained in:
parent
9c6124f829
commit
024d5275c5
1 changed files with 4 additions and 4 deletions
|
@ -498,14 +498,12 @@ (define print-log-line
|
|||
(spin! #f port))))))
|
||||
|
||||
(define erase-current-line*
|
||||
(if (isatty?* port)
|
||||
(lambda (port)
|
||||
(if (and (not print-log?) (isatty?* port))
|
||||
(lambda ()
|
||||
(erase-current-line port)
|
||||
(force-output port))
|
||||
(const #t)))
|
||||
|
||||
(unless print-log?
|
||||
(erase-current-line* port)) ;clear the spinner or progress bar
|
||||
(match event
|
||||
(('build-started drv . _)
|
||||
(let ((properties (derivation-properties
|
||||
|
@ -530,6 +528,7 @@ (define erase-current-line*
|
|||
(format port (info (G_ "building ~a...")) drv))))
|
||||
(newline port))
|
||||
(('build-succeeded drv . _)
|
||||
(erase-current-line*) ;erase spinner or progress bar
|
||||
(when (or print-log? (not (extended-build-trace-supported?)))
|
||||
(format port (success (G_ "successfully built ~a")) drv)
|
||||
(newline port))
|
||||
|
@ -542,6 +541,7 @@ (define erase-current-line*
|
|||
(length ongoing))
|
||||
(map build-derivation ongoing)))))
|
||||
(('build-failed drv . _)
|
||||
(erase-current-line*) ;erase spinner or progress bar
|
||||
(format port (failure (G_ "build of ~a failed")) drv)
|
||||
(newline port)
|
||||
(match (derivation-log-file drv)
|
||||
|
|
Loading…
Reference in a new issue